Skip to content

Use new handles API in ros2_controllers to fix deprecation warnings #1566

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

Open
wants to merge 73 commits into
base: master
Choose a base branch
from

Conversation

kumar-sanjeeev
Copy link
Contributor

@kumar-sanjeeev kumar-sanjeeev commented Mar 3, 2025

This PR applies the new API changes in the handles of ros2_control in following controllers in same fashion as #1565:

  • ackermann_steering_controller
  • bicycle_steering_controller
  • admittance_controller
  • effort_controllers
  • forward_command_controller
  • gpio_controllers
  • gripper_controllers
  • mecanum_drive_controller
  • parallel_gripper_controller
  • tricycle_controller
  • pid_controller
  • tricycle_steering_controller
  • mecum_driver_contoller
  • force_torque_sensor_broadcaster
  • steering_controllers_library
  • joint_state_broadcaster
  • position_controllers
  • joint_trajectory_controller (partial fixed)
  • diff_drive_controller

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Looks fine, thanks!

@kumar-sanjeeev
Copy link
Contributor Author

Looks fine, thanks!

@christophfroehlich hi, one question - I have made progress on other controllers as well locally on my system. Can I push these changes into this PR as well (will update description), or should I wait for more reviews on current submitted PR ?

@christophfroehlich
Copy link
Contributor

@saikishor ?

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.

The changes already look good to me. I just forgot to comment.
@kumar-sanjeeev yes, please proceed with other packages as well

@kumar-sanjeeev
Copy link
Contributor Author

@saikishor and @christophfroehlich , one question, would you like me to complete all the controller packages first, and then you would review them of all together? Or would you prefer to first provide feedback on the commits that have already been pushed in this PR?

@christophfroehlich
Copy link
Contributor

apply the changes to all of them please

@saikishor
Copy link
Member

Yes please

Copy link

codecov bot commented Jul 20, 2025

Codecov Report

Attention: Patch coverage is 51.77305% with 136 lines in your changes missing coverage. Please review.

Project coverage is 85.66%. Comparing base (a10c564) to head (3635b67).

Files with missing lines Patch % Lines
...roller/parallel_gripper_action_controller_impl.hpp 6.06% 30 Missing and 1 partial ⚠️
...ory_controller/src/joint_trajectory_controller.cpp 51.66% 20 Missing and 9 partials ⚠️
...llers_library/src/steering_controllers_library.cpp 40.54% 16 Missing and 6 partials ⚠️
...dmittance_controller/src/admittance_controller.cpp 33.33% 12 Missing and 2 partials ⚠️
tricycle_controller/src/tricycle_controller.cpp 28.57% 6 Missing and 4 partials ⚠️
pid_controller/src/pid_controller.cpp 44.44% 3 Missing and 2 partials ⚠️
gpio_controllers/src/gpio_command_controller.cpp 50.00% 2 Missing and 2 partials ⚠️
..._controllers/src/joint_group_effort_controller.cpp 0.00% 2 Missing and 1 partial ⚠️
...ommand_controller/src/forward_controllers_base.cpp 25.00% 2 Missing and 1 partial ⚠️
...ontrollers/src/joint_group_velocity_controller.cpp 0.00% 2 Missing and 1 partial ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1566      +/-   ##
==========================================
- Coverage   86.44%   85.66%   -0.78%     
==========================================
  Files         123      123              
  Lines       12259    12407     +148     
  Branches     1023     1055      +32     
==========================================
+ Hits        10597    10629      +32     
- Misses       1344     1430      +86     
- Partials      318      348      +30     
Flag Coverage Δ
unittests 85.66% <51.77%> (-0.78%) ⬇️

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

Files with missing lines Coverage Δ
...roller/test/test_ackermann_steering_controller.cpp 100.00% <100.00%> (ø)
...ntroller/test/test_bicycle_steering_controller.cpp 100.00% <100.00%> (ø)
...ollers/test/test_joint_group_effort_controller.cpp 98.43% <ø> (ø)
...ster/test/test_force_torque_sensor_broadcaster.cpp 98.15% <ø> (ø)
...ontroller/test/test_forward_command_controller.cpp 98.65% <ø> (ø)
...est_multi_interface_forward_command_controller.cpp 99.13% <ø> (ø)
..._controllers/test/test_gpio_command_controller.cpp 99.00% <ø> (ø)
..._controller/test/test_mecanum_drive_controller.cpp 100.00% <100.00%> (ø)
pid_controller/test/test_pid_controller.cpp 100.00% <100.00%> (ø)
...roller/test/test_pid_controller_dual_interface.cpp 100.00% <ø> (ø)
... and 21 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kumar-sanjeeev
Copy link
Contributor Author

@christophfroehlich hello, I have tried to resolve all pending comments except the one mentioned in parallel_gripper_controller/include/parallel_gripper_controller/parallel_gripper_action_controller_impl.hpp by @saikishor. I am not sure how to approach that one yet.

I have also rechecked all controllers for any get_value() and set_value() deprecation warnings - all of them should be covered (hopefully 🙂).

please let me know if I have missed or overlooked anything.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks again! Some minor cleanups only, rest looks great!
let's see if @saikishor can specify what he meant with the parallel_gripper controller.

@kumar-sanjeeev
Copy link
Contributor Author

Thanks again! Some minor cleanups only, rest looks great! let's see if @saikishor can specify what he meant with the parallel_gripper controller.

Thanks for quick review :) , implemented your suggestions.

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.

@kumar-sanjeeev Great work, just some nitpicks and some critical things but rest looks great

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.

4 participants