-
Notifications
You must be signed in to change notification settings - Fork 53
Provide lifecycle services in the rclc lifecycle nodes #51
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
Provide lifecycle services in the rclc lifecycle nodes #51
Conversation
Adds an additional callback type and handling that allows passing additional service context (void *) to a service callback. ros2#35 Signed-off-by: Arne Nordmann <[email protected]>
Signed-off-by: Arne Nordmann <[email protected]>
* Adds user API to add service with additional context * Tests (copied and adapted from service with request id tests) Signed-off-by: Arne Nordmann <[email protected]>
Signed-off-by: Arne Nordmann <[email protected]>
Signed-off-by: Arne Nordmann <[email protected]>
Declares service callbacks for lifecycle services: get state and get available states #40 Signed-off-by: Arne Nordmann <[email protected]>
#40 Signed-off-by: Arne Nordmann <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
…vices Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
- Coverage 61.53% 60.89% -0.65%
==========================================
Files 13 13
Lines 1378 1427 +49
Branches 412 424 +12
==========================================
+ Hits 848 869 +21
- Misses 343 371 +28
Partials 187 187
Continue to review full report at Codecov.
|
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
* Functions to initialize lifecycle services for nodes * Exemplary lifecycle nodes with services #40 Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
|
@JanStaschulat can you try to sign commit 7b0111a? This commit is complained about by the DCO check |
3d3046a to
d86393d
Compare
|
I tried three times. But DCO test did not pass. It seems, that a new commit hash was added instead. I did: I manually set "DCO to pass". |
* resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <[email protected]> * data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well. Signed-off-by: Jan Staschulat <[email protected]>
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.
Looks great to me. Just some minor changes:
- add checks for NULL pointer for all pointer arguments in your functions
- some functions return
voidinstead ofrcl_ret_t. Was this your intention? - some minor improvement in rclc_examples and unit tests (simplification of executor initialization)
Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]>
|
Thank you very much for your thorough review, Jan. I resolved most of the points, just have a question concerning your comment on the return type of my service callbacks. |
f29334e to
34c1d54
Compare
|
Could not signoff the comments, tried it two times (as suggested from "Details" and with both did not add a signoff message to the commit. Do you have any other suggestion? |
34c1d54 to
2961db5
Compare
…rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR ros2#46 and issue ros2#49 Signed-off-by: Jan Staschulat <[email protected]>
2961db5 to
c303e0b
Compare
|
Unfortunately, I have no better idea. Tried it myself in other PR's as well and failed. So we have to go with setting it manually, I am afraid. |
|
@mergify backport galactic foxy |
* Adds service callback with service context Adds an additional callback type and handling that allows passing additional service context (void *) to a service callback. #35 Signed-off-by: Arne Nordmann <[email protected]> * Fixed service callback handling Signed-off-by: Arne Nordmann <[email protected]> * Adds user API and tests * Adds user API to add service with additional context * Tests (copied and adapted from service with request id tests) Signed-off-by: Arne Nordmann <[email protected]> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <[email protected]> * Fixes service call with context tests Signed-off-by: Arne Nordmann <[email protected]> * Adds service callbacks to lifecycle node Declares service callbacks for lifecycle services: get state and get available states micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 * Cmake linting Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Lifecycle services working * Functions to initialize lifecycle services for nodes * Exemplary lifecycle nodes with services micro-ROS#40 Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <[email protected]> * data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well. Signed-off-by: Jan Staschulat <[email protected]> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> Co-authored-by: Jan Staschulat <[email protected]> (cherry picked from commit 865b02b)
* Adds service callback with service context Adds an additional callback type and handling that allows passing additional service context (void *) to a service callback. #35 Signed-off-by: Arne Nordmann <[email protected]> * Fixed service callback handling Signed-off-by: Arne Nordmann <[email protected]> * Adds user API and tests * Adds user API to add service with additional context * Tests (copied and adapted from service with request id tests) Signed-off-by: Arne Nordmann <[email protected]> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <[email protected]> * Fixes service call with context tests Signed-off-by: Arne Nordmann <[email protected]> * Adds service callbacks to lifecycle node Declares service callbacks for lifecycle services: get state and get available states micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 * Cmake linting Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Lifecycle services working * Functions to initialize lifecycle services for nodes * Exemplary lifecycle nodes with services micro-ROS#40 Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <[email protected]> * data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well. Signed-off-by: Jan Staschulat <[email protected]> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> Co-authored-by: Jan Staschulat <[email protected]> (cherry picked from commit 865b02b) # Conflicts: # rclc_lifecycle/src/rclc_lifecycle/rclc_lifecycle.c # rclc_lifecycle/test/test_lifecycle.cpp
|
Command
Hey, I reacted but my real name is @Mergifyio |
* Adds service callback with service context Adds an additional callback type and handling that allows passing additional service context (void *) to a service callback. #35 Signed-off-by: Arne Nordmann <[email protected]> * Fixed service callback handling Signed-off-by: Arne Nordmann <[email protected]> * Adds user API and tests * Adds user API to add service with additional context * Tests (copied and adapted from service with request id tests) Signed-off-by: Arne Nordmann <[email protected]> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <[email protected]> * Fixes service call with context tests Signed-off-by: Arne Nordmann <[email protected]> * Adds service callbacks to lifecycle node Declares service callbacks for lifecycle services: get state and get available states micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <[email protected]> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 * Cmake linting Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Lifecycle services working * Functions to initialize lifecycle services for nodes * Exemplary lifecycle nodes with services micro-ROS#40 Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <[email protected]> * data_available has to be reset to false, if rcl_take fails - this needs to be updated for subscriptions as well. Signed-off-by: Jan Staschulat <[email protected]> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <[email protected]> * commnted out check for received sequence id - error in build-job for rolling https://build.ros2.org/job/Rpr__rclc__ubuntu_focal_amd64/72/ see also PR #46 and issue #49 Signed-off-by: Jan Staschulat <[email protected]> Co-authored-by: Jan Staschulat <[email protected]> (cherry picked from commit 865b02b) Co-authored-by: Arne Nordmann <[email protected]>
|
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-humble-hawksbill-released/25729/14 |
* Update CI Syntax Update source Fix * Add pedatic * add rolling from binaries Update Update * Updating to Ralph approach * Added eloquent and dashing * Added dockers Updated
Provides convenience functions for lifecycle nodes to provide lifecycle services.
micro-ROS#40