-
Notifications
You must be signed in to change notification settings - Fork 72
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
Actions support in rclnodejs #469
Labels
Comments
18 tasks
I spent half a day to dig into this feature and found it's more difficult than I thought which means we need more effort on it. An official introduction of Actions in ROS2 |
Here's a breakdown of the work that needs to be done.
|
minggangw
pushed a commit
that referenced
this issue
Mar 26, 2020
* Add actions branch to CI (#572) Fix #None * Add actions to the event loop (#570) Adds action clients and servers into the event loop. You can't add action client/servers right now so this change essentially does nothing. Actions present an interesting problem where not only do you need to know if the handle is ready, but you also need to know what to execute within the handle. rclpy abstracts actions with a Waitable base class and lets the sub-class fill in the details of reading from the wait_set. This approach doesn't fit in with the design of rclnodejs, so instead actions are treated as entities, similar to publishers, subscribers, etc, but with some special handling. To know what part of the action server/client should be processed a property bag has added to RclHandle allowing the event loop to attach arbitrary data to be sent back to the main thread. The property bag could be extended in the future if ever needed by other entity types. Below is how the property bag would be used in later PRs. ```javascript // From Node class execute(handles) { let actionServersReady = this._actionServers.filter((actionServer) => handles.indexOf(actionServer.handle) !== -1); // ... actionServersReady.forEach((actionServer) => { // Read the properties from the handle let properties = actionServer.handle.properties; if (properties.isGoalRequestReady) { // process goal request } if (properties.isCancelRequestReady) { // process cancel request } // process other requests } } ``` Note this PR is targeting the 'actions' branch. * Read action type support (#571) Adds the utility functions to read from the action type support libraries. * Generate action messages (#577) Updates the rosidl_gen to generate all action JS files (a total of 11 files per action). * Remove repetitious message handling logic * Add ActionClient and ActionServer * Remove dependency on tests_msgs * Add missing action status qos profile * Add action graph functions (#611) Add graph names and types query functions for actions. * Enhance and add more action examples * Add action TypeScript typings * Action implementation cleanup #Fix #469
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: