ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to monitorize ros2 actions from terminal?

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

updated 2021-04-13 15:10:15 -0600

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

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

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
6

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

Comments

2

I think this is a partially good answer because it provides some useful information. I'll vote up. But the question is: can I get the request and the response? (that may be the most essential and useful information)

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2021-03-09 15:31:16 -0600 )edit
1

Hidden topics? Are you kidding me?

Question remains where the goal/request is @sloretz

David Lu gravatar image David Lu  ( 2021-04-23 14:46:27 -0600 )edit

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

The status topic shows when the request and response happen.

and also the request data?

There's currently no way for something other than the action server to get the goal request. Maybe the rmw implementation you're using can get that via a monitoring tool or wireshark plugin. See http://design.ros2.org/articles/actio... for more info that might help come up with a solution to that.

can I get the request and the response?

Multiple clients can get the action result for as long as the server caches it. The default cache time is 15 minutes: https://github.com/ros2/rcl/blob/1aa5... .

Hidden topics? Are you kidding me?

I hear your frustration. You may also want to know there are hidden services http://design.ros2.org/articles/topic...

sloretz gravatar image sloretz  ( 2021-04-26 12:35:20 -0600 )edit

I think accessing to the request/response data is still an essential feature that should be taken into account by the core development team.

(Assuming that this cannot be solved with the current middleware implementation) One possible new workaround-feature could be adding some "debug topics" to the ActionServer and ActionClient classes to check what was sent/received - even if these messages are not part of the interaction and increase the bandwidth usage.

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2021-04-27 05:14:53 -0600 )edit
0

answered 2023-03-29 10:43:09 -0600

tfoote gravatar image

In ROS 2 actions are now a combination of asynchronous service requests and have the optional status and feedback topics for monitoring progress. This is a better match for the semantics of the way actions are intended to work with a one to one ratio of request to execution. (In ROS 1 if two servers were running on the same namespace you'd have race conditions on execution especially interleaving feedback and multiple potential responses with race conditions.

Currently there is not a way to monitor the request and response outside of the server or client as the service requests are one-to-one.

However there is active work to add service introspection capabilities: https://github.com/ros-infrastructure... which should allow this sort of introspection in the future.

edit flag offensive delete link more

Question Tools

4 followers

Stats

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

Seen: 2,506 times

Last updated: Mar 29 '23