Skip to content

Supress the deprecation warnings of the hardware_interface API #2223

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

Conversation

saikishor
Copy link
Member

The changes in this PR should suppress the deprecation warnings that are printed on compilation, There are some deprecations from hardware_interface package and a lot from the transmission_interfaces package (which needs to be addressed in a different PR)

Copy link

codecov bot commented May 4, 2025

Codecov Report

Attention: Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.93%. Comparing base (b2d9bf7) to head (76697a7).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 0.00% 1 Missing and 2 partials ⚠️
...nterface/include/transmission_interface/handle.hpp 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2223      +/-   ##
==========================================
- Coverage   89.14%   88.93%   -0.21%     
==========================================
  Files         141      143       +2     
  Lines       16168    16409     +241     
  Branches     1386     1421      +35     
==========================================
+ Hits        14413    14594     +181     
- Misses       1227     1265      +38     
- Partials      528      550      +22     
Flag Coverage Δ
unittests 88.93% <82.14%> (-0.21%) ⬇️

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

Files with missing lines Coverage Δ
...re_interface/include/hardware_interface/handle.hpp 91.91% <ø> (+2.63%) ⬆️
...de/hardware_interface/loaned_command_interface.hpp 52.50% <ø> (+2.50%) ⬆️
...lude/hardware_interface/loaned_state_interface.hpp 60.00% <ø> (+5.65%) ⬆️
...terface/include/mock_components/generic_system.hpp 100.00% <ø> (ø)
hardware_interface/src/actuator.cpp 80.00% <ø> (ø)
hardware_interface/src/resource_manager.cpp 77.24% <ø> (+0.04%) ⬆️
hardware_interface/src/sensor.cpp 76.66% <ø> (+0.23%) ⬆️
hardware_interface/src/system.cpp 80.00% <ø> (ø)
...rface/test/mock_components/test_generic_system.cpp 99.72% <ø> (ø)
...dware_interface/test/test_component_interfaces.cpp 97.67% <ø> (ø)
... and 9 more

... and 3 files with indirect coverage changes

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

@christophfroehlich christophfroehlich linked an issue May 17, 2025 that may be closed by this pull request
8 tasks
@christophfroehlich
Copy link
Contributor

Should this go into jazzy as well, are we fine with the ABI break there?
image

@saikishor
Copy link
Member Author

Should this go into jazzy as well, are we fine with the ABI break there?
image

This should be from the transmission interface fixes. If we don't want the changes like this, then we will have to use the other PR to properly fix it

@bmagyar bmagyar added the backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 jazzy. label May 17, 2025
@bmagyar
Copy link
Member

bmagyar commented May 17, 2025

We should get it into jazzy too, there's too much spamming as-is.

Comment on lines +18 to +21
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "hardware_interface/handle.hpp"
#pragma GCC diagnostic pop
Copy link
Member Author

Choose a reason for hiding this comment

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

May be this is not needed. Let me check this afternoon and confirm

Copy link
Member

Choose a reason for hiding this comment

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

we should be cleaning these up in rolling/kilted anyways soon, let's move

@saikishor
Copy link
Member Author

With this PR, we are also changing the transmission handles. Earlier we were using the hardware_interface Handle and now we are using an older implementation with only variable reference. This way we can safely use get_value and set_value methods

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.

The changes LGTM, thanks for the cleanup <3

@bmagyar bmagyar merged commit b3ef6d8 into ros-controls:master May 18, 2025
17 of 25 checks passed
@bmagyar bmagyar deleted the suppress/internal/deprecations branch May 18, 2025 21:29
mergify bot pushed a commit that referenced this pull request May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 jazzy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix unused-result warning from helpers.hpp
3 participants