-
Notifications
You must be signed in to change notification settings - Fork 206
Description
Feature request
Feature description
Analogous to topics and services, there should be a command line tool for actions:
ros2 action
Here is a list of tool capabilities and proposed signatures:
-
list action names associated with any running action servers or action clients
# For example $ ros2 action list /fibonacci /some/name/space/my_action -
list action servers and action clients associated with an action name
ros2 action info ACTION_NAME # For example: $ ros2 action info /fibonacci Action: /fibonacci Action Clients: 2 /node/foo /another/node/bar Action Servers: 1 /baz -
display active goals on an action server
ros2 action goals ACTION_NAME # For example $ ros2 action goals /fibonacci 152790028afb49a3b3c61383e6b97320 8c3449e71c9941ed8ad3d68fdd7f553c b07cb18ca2dc4cca95acfc131fc49223 -
display the arguments for an action goal
ros2 action goal info ACTION_NAME GOAL_UUID # For example: $ ros2 action goal info /fibonacci 152790028afb49a3b3c61383e6b97320 Action: /fibonacci Goal ID: 152790028afb49a3b3c61383e6b97320 order: 10 -
display the type of an action's goal, feedback, and result
ros2 action show ACTION_TYPE # For example: $ ros2 action show example_interfaces/Fibonacci # Goal int32 order --- # Result int32[] sequence --- # Feedback int32[] sequence -
find actions by action type
# Accomplished with a ros2 action list option: $ ros2 action list --show-types /fibonacci [example_interfaces/Fibonacci] /some/name/space/my_action [test_msgs/NestedMessage] -
echo feedback, status, and result for an action goal
ros2 action echo [--feedback] [--status] [--result] ACTION_NAME GOAL_UUID # For example, getting feedback, status, and result messages: $ ros2 action echo /fibonacci 152790028afb49a3b3c61383e6b97320 Feedback: sequence: [0, 1, 1] Feedback: sequence: [0, 1, 1, 2] Feedback: sequence: [0, 1, 1, 2, 3] Result: sequence: [0, 1, 1, 2, 3] Status: SUCCESS # For example, only echo status and result messages: $ ros2 action goal echo --status --result /fibonacci 152790028afb49a3b3c61383e6b97320 Result: sequence: [0, 1, 1, 2] Status: ABORTED -
send an action goal, display feedback as it is received, display the result when received, and cancel the action (when the tool is terminated):
ros2 action send_goal ACTION_NAME ACTION_TYPE GOAL_MESSAGE # For example: $ ros2 action send_goal /fibonacci example_interfaces/Fibonacci "order: 5" Sending goal... Goal accepted. Feedback: sequence: [0, 1, 1] Feedback: sequence: [0, 1, 1, 2] Feedback: sequence: [0, 1, 1, 2, 3] Feedback: sequence: [0, 1, 1, 2, 3, 5] Result: sequence: [0, 1, 1, 2, 3, 5]
In addition, the ros2 node info command should also list actions associated with a give node. For example:
$ ros2 node info /foo
/foo
Subscribers:
# ... subscriptions listed here
Publishers:
# ... publishers listed here
Services:
# ... services listed here
Actions:
# ... actions listed here
Design document: ros2/design#193