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

Propagate read/write rate to the HardwareInfo properly #1927

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saikishor
Copy link
Member

Fixes #1926

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.

It feels a bit strange to pass the update rate to the parsing functions (but I have no better idea as of now).
But don't we have to pass it here?

const auto hardware_info = hardware_interface::parse_control_resources_from_urdf(urdf);

And we will have to change gazebo+gz_ros2_control if we change API here.

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.73%. Comparing base (d40377d) to head (a386668).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1927      +/-   ##
==========================================
- Coverage   87.73%   87.73%   -0.01%     
==========================================
  Files         122      122              
  Lines       12978    12976       -2     
  Branches     1156     1156              
==========================================
- Hits        11386    11384       -2     
  Misses       1164     1164              
  Partials      428      428              
Flag Coverage Δ
unittests 87.73% <100.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
hardware_interface/src/component_parser.cpp 94.82% <100.00%> (ø)
hardware_interface/src/resource_manager.cpp 73.23% <100.00%> (-0.07%) ⬇️
hardware_interface/test/test_component_parser.cpp 98.90% <ø> (ø)

@saikishor
Copy link
Member Author

It feels a bit strange to pass the update rate to the parsing functions (but I have no better idea as of now). But don't we have to pass it here?

const auto hardware_info = hardware_interface::parse_control_resources_from_urdf(urdf);

And we will have to change gazebo+gz_ros2_control if we change API here.

hahah you are right

@saikishor
Copy link
Member Author

@christophfroehlich I understand. I share the same concerns at the beginning. Either we do it there or we remove the const here, and modify it here in the code

const auto hardware_info = hardware_interface::parse_control_resources_from_urdf(urdf);

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.

rw_rate is not accessible from the HardwareComponent
2 participants