-
Notifications
You must be signed in to change notification settings - Fork 42
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
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 <arne.nordmann@de.bosch.com>
Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
* Adds user API to add service with additional context * Tests (copied and adapted from service with request id tests) Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
Declares service callbacks for lifecycle services: get state and get available states #40 Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
#40 Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
…vices Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
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) <arne.nordmann@de.bosch.com>
* Functions to initialize lifecycle services for nodes * Exemplary lifecycle nodes with services #40 Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com>
@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 <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com>
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
void
instead 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) <arne.nordmann@de.bosch.com>
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 <jan.staschulat@de.bosch.com>
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 <arne.nordmann@de.bosch.com> * Fixed service callback handling Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Fixes service call with context tests Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> Co-authored-by: Jan Staschulat <jan.staschulat@de.bosch.com> (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 <arne.nordmann@de.bosch.com> * Fixed service callback handling Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Fixes service call with context tests Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> Co-authored-by: Jan Staschulat <jan.staschulat@de.bosch.com> (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 <arne.nordmann@de.bosch.com> * Fixed service callback handling Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Proper tear-down of msgs Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Fixes service call with context tests Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * 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 <arne.nordmann@de.bosch.com> * Adds callback for GetState service micro-ROS#40 Signed-off-by: Arne Nordmann <arne.nordmann@de.bosch.com> * Provide GetAvailableStates service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Example lifecycle node proides services Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Implemented ChangeState service Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Linting, documentation, example Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Adds missing declaration of callbacks Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * Pre-initialize all strings Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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) <arne.nordmann@de.bosch.com> * Tests for service initialization Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Ignoring unsuccessful SERVICE_TAKE (#175) * resolved bug by ignoring RCL_RET_SERVICE_TAKE_FAILED Signed-off-by: Jan Staschulat <jan.staschulat@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> * Fixes init and cleanup Signed-off-by: Nordmann Arne (CR/ADT3) <arne.nordmann@de.bosch.com> * 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 <jan.staschulat@de.bosch.com> Co-authored-by: Jan Staschulat <jan.staschulat@de.bosch.com> (cherry picked from commit 865b02b) Co-authored-by: Arne Nordmann <arne.nordmann@de.bosch.com>
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