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

Handle SIGINT properly in the controller manager (backport #2014) #2040

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 6, 2025

resolves #2012
resolves #1168
resolves #472

Needed by ros-controls/ros2_control_demos#548

With example_1 of ros2_control_demos:

[ros2_control_node-1] [INFO] [1737720810.651704682] [controller_manager]: Shutdown request received....
[ros2_control_node-1] [INFO] [1737720810.651778082] [controller_manager]: Shutting down all controllers in the controller manager.
[ros2_control_node-1] [INFO] [1737720810.651830233] [controller_manager]: Deactivating controller 'joint_state_broadcaster'
[ros2_control_node-1] [INFO] [1737720810.652020354] [controller_manager]: Shutting down controller 'joint_state_broadcaster'
[ros2_control_node-1] [INFO] [1737720810.652065784] [controller_manager]: Deactivating controller 'forward_position_controller'
[ros2_control_node-1] [INFO] [1737720810.652169914] [controller_manager]: Shutting down controller 'forward_position_controller'
[ros2_control_node-1] [INFO] [1737720810.652240505] [resource_manager]: 'deactivate' hardware 'RRBot' 
[ros2_control_node-1] [INFO] [1737720810.652259975] [controller_manager.resource_manager.hardware_component.system.RRBot]: Deactivating ...please wait...
[INFO] [robot_state_publisher-2]: process has finished cleanly [pid 399725]
[INFO] [rviz2-5]: process has finished cleanly [pid 399819]
[ros2_control_node-1] [INFO] [1737720811.652349811] [controller_manager.resource_manager.hardware_component.system.RRBot]: 3.0 seconds left...
[ros2_control_node-1] [INFO] [1737720812.652490121] [controller_manager.resource_manager.hardware_component.system.RRBot]: 2.0 seconds left...
[ros2_control_node-1] [INFO] [1737720813.652626335] [controller_manager.resource_manager.hardware_component.system.RRBot]: 1.0 seconds left...
[ros2_control_node-1] [INFO] [1737720813.652682125] [controller_manager.resource_manager.hardware_component.system.RRBot]: Successfully deactivated!
[ros2_control_node-1] [INFO] [1737720813.652700605] [resource_manager]: Successful 'deactivate' of hardware 'RRBot'
[ros2_control_node-1] [INFO] [1737720813.652715105] [resource_manager]: 'shutdown' hardware 'RRBot' 
[ros2_control_node-1] [INFO] [1737720813.652722355] [resource_manager]: Successful 'shutdown' of hardware 'RRBot'
[ros2_control_node-1] [INFO] [1737720813.652773225] [controller_manager]: Shutting down the controller manager.

This is an automatic backport of pull request #2014 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Feb 6, 2025
Copy link
Contributor Author

mergify bot commented Feb 6, 2025

Cherry-pick of 882b489 has failed:

On branch mergify/bp/humble/pr-2014
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 882b489.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hardware_interface/include/hardware_interface/resource_manager.hpp
	modified:   hardware_interface/src/resource_manager.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_manager/include/controller_manager/controller_manager.hpp
	both modified:   controller_manager/src/controller_manager.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@saikishor saikishor force-pushed the mergify/bp/humble/pr-2014 branch from 14b9f9b to 7292129 Compare February 6, 2025 11:18
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 19.60784% with 41 lines in your changes missing coverage. Please review.

Project coverage is 62.67%. Comparing base (c04a16f) to head (2d8fa81).
Report is 89 commits behind head on humble.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 25.00% 30 Missing ⚠️
hardware_interface/src/resource_manager.cpp 0.00% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           humble    #2040       +/-   ##
===========================================
- Coverage   87.00%   62.67%   -24.34%     
===========================================
  Files          97      109       +12     
  Lines        7505    12641     +5136     
  Branches      677     8583     +7906     
===========================================
+ Hits         6530     7923     +1393     
- Misses        688      902      +214     
- Partials      287     3816     +3529     
Flag Coverage Δ
unittests 62.67% <19.60%> (-24.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../include/controller_manager/controller_manager.hpp 100.00% <ø> (ø)
hardware_interface/src/resource_manager.cpp 77.87% <0.00%> (-2.33%) ⬇️
controller_manager/src/controller_manager.cpp 65.62% <25.00%> (-6.25%) ⬇️

... and 83 files with indirect coverage changes

@saikishor saikishor requested a review from fmauch February 6, 2025 11:45
@saikishor
Copy link
Member

@urfeex when you have time, please test this branch and let us know if it works.

Thank you!

Copy link
Contributor

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works just like on the Humble branch :-)

I am just wondering about the removed CONTROLLER_MANAGER_PUBLIC macros.

@saikishor saikishor force-pushed the mergify/bp/humble/pr-2014 branch from b7c0f77 to 2d8fa81 Compare February 6, 2025 12:10
@bmagyar bmagyar merged commit e1076b3 into humble Feb 7, 2025
11 of 13 checks passed
@bmagyar bmagyar deleted the mergify/bp/humble/pr-2014 branch February 7, 2025 12:46
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.

3 participants