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

Cleanup wrong lifecycle transitions in tests and unnecessary checks #1534

Merged
merged 10 commits into from
Feb 13, 2025

Conversation

christophfroehlich
Copy link
Contributor

@christophfroehlich christophfroehlich commented Feb 11, 2025

  • We can assume that only valid transitions are performed (on_configure only if on_init succeeded)
  • CM calls the update methods of controllers only in active state, so we don't have to check that again, and we also should not do that in the tests.

Closes #417 and closes #405 and closes #1501

saikishor
saikishor previously approved these changes Feb 11, 2025
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.49%. Comparing base (c83cfb3) to head (34b4a2c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1534      +/-   ##
==========================================
+ Coverage   84.27%   84.49%   +0.21%     
==========================================
  Files         123      123              
  Lines       11359    11297      -62     
  Branches      961      950      -11     
==========================================
- Hits         9573     9545      -28     
+ Misses       1470     1446      -24     
+ Partials      316      306      -10     
Flag Coverage Δ
unittests 84.49% <100.00%> (+0.21%) ⬆️

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

Files with missing lines Coverage Δ
...iff_drive_controller/src/diff_drive_controller.cpp 74.77% <100.00%> (+1.96%) ⬆️
...ive_controller/test/test_diff_drive_controller.cpp 94.31% <ø> (-0.02%) ⬇️
...mand_controller/src/forward_command_controller.cpp 100.00% <ø> (+20.00%) ⬆️
...src/multi_interface_forward_command_controller.cpp 100.00% <ø> (+18.75%) ⬆️
gpio_controllers/src/gpio_command_controller.cpp 86.78% <ø> (+1.47%) ⬆️
...per_controllers/gripper_action_controller_impl.hpp 32.11% <ø> (+0.68%) ⬆️
..._state_broadcaster/src/joint_state_broadcaster.cpp 89.17% <ø> (-0.07%) ⬇️
..._broadcaster/test/test_joint_state_broadcaster.cpp 96.60% <ø> (-0.03%) ⬇️
...ory_controller/src/joint_trajectory_controller.cpp 85.21% <ø> (+0.32%) ⬆️
...ectory_controller/test/test_trajectory_actions.cpp 97.10% <ø> (-0.01%) ⬇️
... and 6 more

... and 3 files with indirect coverage changes

bmagyar
bmagyar previously approved these changes Feb 12, 2025
@christophfroehlich christophfroehlich changed the title Cleanup wrong lifecycle transitions and unnecessary checks Cleanup wrong lifecycle transitions in tests and unnecessary checks Feb 12, 2025
Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning things.
Looks very good to me.

Great job 👏🏾

@christophfroehlich christophfroehlich merged commit 6d681ef into master Feb 13, 2025
22 of 25 checks passed
@christophfroehlich christophfroehlich deleted the cleanup_controllers branch February 13, 2025 11:16
Amronos added a commit to Amronos/ros2_controllers that referenced this pull request Feb 13, 2025
Also removed a redundant test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants