-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Action CLI #214
Add Action CLI #214
Conversation
Contains ros2cli command 'action' with verbs: list and show. The list verb lists action names for any running action servers and action clients. The show verb prints the definition for a given action type. Signed-off-by: Jacob Perron <[email protected]>
Prints a list of node names that have an action client or server for a given action name. Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
The tool shouldn't need to know details about the implementation of actions. Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Not sure how trivial it is, but somehow echoing the feedback after submitting a goal would be extremely handy I believe. |
Currently, the $ ros2 action send_goal --feedback /fibonacci example_interfaces/Fibonacci "order: 5"
Waiting for an action server to become available...
Sending goal:
order: 5
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]
Goal finished with status: SUCCEEDED I agree that also echoing the goal ID would be useful. |
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
The command line tool looks great to me. I can send a command, get the feedback and see the action definitions. 👍 Only nitpick I had was for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll give you a 👍 , but you might want to have somebody look over the code who has a more critical eye on Python code than me :)
I was trying to mimic |
Signed-off-by: Jacob Perron <[email protected]>
This also has the side-effect of making the forward slash optional for the action name. Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
The forward slash situation was addressed. 👍 I have two more remarks though:
|
Thanks @Karsten1987!
I plan to make this feature as part of a new
This reminded me that the intention was to cancel the goal if the user terminates the I can also see the value in a separate |
Wrapped send goal logic in try-finally clause. This ensures that any active goal will be canceled before the CLI command terminates and also ensure that the ROS node is shutdown. Signed-off-by: Jacob Perron <[email protected]>
I've updated the send goal logic to account for a SIGINT or errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nitpicks fixed and green CI. It works fine, including tab completion, on my machine.
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Done 6a62cb8 |
Created a new package,
ros2action
, defining the commandaction
. This PR adds implementation for the following verbs:Connects to #202
Requires ros2/rcl#411
Requires ros2/rclpy#306