Skip to content

Deactivate controllers with command interfaces to hardware on DEACTIVATE (backport #2334) #2341

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 26, 2025

Closes #2318

While testing with hardware I found it was easiest to only return DEACTIVATE from write() so that my hardware_interface didn't have to keep track of the number of times DEACTIVATE has been returned in read(). I also found that allowing write() while the hardware is INACTIVE does not make sense because ALL commanding controllers are stopped on deactivation and the hardware would not know which command_interfaces might be allowed returning DEACTIVATE again which would cause the controller_manager to get stuck in a loop attempting to stop any controllers with with command interfaces to the hardware.

I also added 2 new test to make sure the controller_manager correctly handles DEACTIVATE on read/write.


This is an automatic backport of pull request #2334 done by Mergify.

Copy link

codecov bot commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 97.48428% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.70%. Comparing base (1c21a98) to head (a3dc13d).
Report is 1 commits behind head on jazzy.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 88.00% 2 Missing and 1 partial ⚠️
hardware_interface/src/resource_manager.cpp 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #2341      +/-   ##
==========================================
+ Coverage   88.66%   88.70%   +0.04%     
==========================================
  Files         144      144              
  Lines       16651    16728      +77     
  Branches     1437     1442       +5     
==========================================
+ Hits        14764    14839      +75     
- Misses       1335     1336       +1     
- Partials      552      553       +1     
Flag Coverage Δ
unittests 88.70% <97.48%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
...est_controller_manager_hardware_error_handling.cpp 100.00% <100.00%> (ø)
hardware_interface/src/system.cpp 80.42% <100.00%> (+0.42%) ⬆️
...rface/test/mock_components/test_generic_system.cpp 99.72% <ø> (ø)
...dware_interface/test/test_component_interfaces.cpp 97.65% <100.00%> (-0.03%) ⬇️
...e_interface_testing/test/test_resource_manager.cpp 99.45% <100.00%> (ø)
hardware_interface/src/resource_manager.cpp 74.05% <85.71%> (-0.03%) ⬇️
controller_manager/src/controller_manager.cpp 74.53% <88.00%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bmagyar bmagyar merged commit ca98a45 into jazzy Jun 26, 2025
12 of 14 checks passed
@bmagyar bmagyar deleted the mergify/bp/jazzy/pr-2334 branch June 26, 2025 20:44
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