Ask Your Question
0

how to monitorize ros2 actions from terminal?

asked 2020-11-20 13:48:48 -0600

updated 2020-11-20 14:23:03 -0600

Is there a way to "watchdog" an action and see when a request is made?

Is there a way to "watchdog" an action and see when a response is provided by the server?

In ROS1 that was possible just using "ros topic echo" on request, feedback and result topics.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2020-11-23 10:24:01 -0600

sloretz gravatar image

All ros2 topics have a status topic for monitoring them. To have a look launch an action server, then list the topics with hidden topics shown:

$ ros2 run examples_rclcpp_minimal_action_server action_server_member_functions

...

$ ros2 topic list --include-hidden-topics
/fibonacci/_action/feedback
/fibonacci/_action/status
/parameter_events
/rosout

Echo the _action/status topic while sending a goal

$ ros2 topic echo /fibonacci/_action/status
status_list:
- goal_info:
    goal_id:
      uuid:
      - 82
      - 166
      - 223
      - 231
      - 14
      - 16
      - 94
      - 134
      - 45
      - 224
      - 247
      - 104
      - 135
      - 179
      - 196
      - 14
    stamp:
      sec: 1606145080
      nanosec: 966343610
  status: 2
---
status_list:
- goal_info:
    goal_id:
      uuid:
      - 82
      - 166
      - 223
      - 231
      - 14
      - 16
      - 94
      - 134
      - 45
      - 224
      - 247
      - 104
      - 135
      - 179
      - 196
      - 14
    stamp:
      sec: 1606145080
      nanosec: 966343610
  status: 4
---

...

$ ros2 run examples_rclcpp_minimal_action_client action_client_member_functions

Notice the first message status 2 is EXECUTING, and the second is status 4 SUCCEEDED. This server chose to execute the goal right away, but other servers may accept the goal, hold on to it for a bit, then execute it later.

See the ROS 2 action design doc for more info.

edit flag offensive delete link more
-1

answered 2020-11-20 14:50:36 -0600

girayuzun gravatar image

I found that on ROS2 main page, could you try this?

ros2 topic echo /turtle1/cmd_vel

Source

edit flag offensive delete link more

Comments

that is not a correct answer. That is for monitorizing a topic. I am asking about an action.

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2020-11-20 15:52:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-11-20 13:48:48 -0600

Seen: 32 times

Last updated: Nov 23