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

Backport Python Actions #282

Merged
merged 7 commits into from
Mar 10, 2019
Merged

Backport Python Actions #282

merged 7 commits into from
Mar 10, 2019

Conversation

* Add rclpy_action module

With functions for creating and destroying action clients.

* Implement action client

* Move common conversion function and typedefs to shared header file (impl/common.h)

* Add tests using mock action server

* Add action module for aggregating action related submodules

* Extend Waitable API so executors are aware of Futures

* Move check_for_type_support() to its own module

Signed-off-by: Jacob Perron <[email protected]>
…e wait set (#272)

If a task is created, then trigger the Executors guard condition. This will wake any blocking call to `rcl_wait()`.
In this scenario, no work is yielded, so we also have to move the check for 'in-progress' tasks into the wait loop.

Added a unit test to reproduce the issue.

This resolves an issue in some cases where the result response from the action server is never processed, therefore never reaching the action client.

Signed-off-by: Jacob Perron <[email protected]>
Previously, if a `Node` was added to an `Executor` using the executors `add_node` method, then nodes `executor` property would return `None`.

Signed-off-by: Jacob Perron <[email protected]>
* Abstract type conversions into functions

This helps with readability and maintainability.
Also eliminated use of assertions during conversions, defering to exceptions.

* Move common C functions to a shared library 'rclpy_common'

Signed-off-by: Jacob Perron <[email protected]>
* Add Action server functions to extension module
    * Separated service related macros into separate request and response calls
* Add server goal handle functions to extension module
* Update Action extension module to use conversion functions
* Add implementation of Python ActionServer
    * Handles goal and cancel requests, responds, and calls user-defined functions for executing goals.
    * Handle result requests
    * Handle expired goals
    * Publish goal status array and feedback
* Add `handle_accepted_callback` to ActionServer

Upon accepting a goal, the provided `handle_accepted_callback` is called with a reference to the goal handle.
The user can then decide to execute the goal or defer.
If `handle_accepted_callback` is not provided, then the default behavior is to execute the goal handle immediately.

Signed-off-by: Jacob Perron <[email protected]>
Some middlewares (e.g. Connext and OpenSplice) send invalid messages to indicate an instance has been disposed which results in a 'failed take'.

Signed-off-by: Jacob Perron <[email protected]>
@jacobperron jacobperron added the in progress Actively being worked on (Kanban column) label Mar 7, 2019
@nuclearsandwich nuclearsandwich merged commit c8dca03 into crystal Mar 10, 2019
@nuclearsandwich nuclearsandwich deleted the backport_python_actions branch March 10, 2019 02:53
@nuclearsandwich nuclearsandwich removed the in progress Actively being worked on (Kanban column) label Mar 10, 2019
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.

2 participants