Skip to content
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

Read action type support #571

Merged
merged 1 commit into from
Feb 20, 2020
Merged

Read action type support #571

merged 1 commit into from
Feb 20, 2020

Conversation

mattrichard
Copy link
Collaborator

@mattrichard mattrichard commented Feb 17, 2020

Adds the utility functions to read from the action type support libraries.

Targets actions branch.

@mattrichard mattrichard merged commit 19b67bc into RobotWebTools:actions Feb 20, 2020
minggangw pushed a commit that referenced this pull request 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant