Skip to content

Conversation

saikishor
Copy link
Member

@saikishor saikishor commented Aug 20, 2025

For frameworks such as EtherCAT that run at high frequency. if the deadline is not met, then the master will start showing errors and eventually it might lead to non-functional system. For this reason, instead of the previous approach where the CM acts as a scheduler for the async activity, I've added a possibility for the component to manage it's own cycle

Needs: ros-controls/realtime_tools#383
Needs: ros-controls/realtime_tools#402

Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 83.67347% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.44%. Comparing base (bb87986) to head (8f0b668).

Files with missing lines Patch % Lines
hardware_interface/src/component_parser.cpp 56.25% 2 Missing and 5 partials ⚠️
...ardware_interface/hardware_component_interface.hpp 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2477      +/-   ##
==========================================
- Coverage   89.45%   89.44%   -0.01%     
==========================================
  Files         147      147              
  Lines       16636    16679      +43     
  Branches     1400     1405       +5     
==========================================
+ Hits        14881    14919      +38     
- Misses       1218     1219       +1     
- Partials      537      541       +4     
Flag Coverage Δ
unittests 89.44% <83.67%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...rface/include/hardware_interface/hardware_info.hpp 81.48% <ø> (ø)
...rface/include/hardware_interface/lexical_casts.hpp 68.00% <ø> (ø)
hardware_interface/src/hardware_component.cpp 76.69% <100.00%> (+0.69%) ⬆️
hardware_interface/src/lexical_casts.cpp 84.61% <100.00%> (+2.00%) ⬆️
hardware_interface/test/test_component_parser.cpp 98.98% <100.00%> (+<0.01%) ⬆️
...ardware_interface/hardware_component_interface.hpp 87.60% <94.73%> (+1.25%) ⬆️
hardware_interface/src/component_parser.cpp 92.51% <56.25%> (-1.37%) ⬇️

... 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.

hardware.is_async = parse_is_async_attribute(ros2_control_it);
hardware.thread_priority = hardware.is_async ? parse_thread_priority_attribute(ros2_control_it)
: std::numeric_limits<int>::max();
hardware.async_params.thread_priority = hardware.thread_priority;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add this to migration_notes

Copy link
Member Author

Choose a reason for hiding this comment

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

I left the old one too. Should I add it to the notes still?

Copy link
Member Author

@saikishor saikishor Sep 23, 2025

Choose a reason for hiding this comment

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

We need this one for sure. I removed it by mistake. This is a fallback approach when you don't define it in the properties tag

if (info_.type != "sensor")
if (
!is_sensor_type &&
this->get_lifecycle_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this intented here? How does this work together with #2501?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is intended. It is the same as when we have an INACTIVE component, we only call read callback but not the write

Copy link
Contributor

Choose a reason for hiding this comment

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

yes which means that we don't allow the "configuration" commands in inactive?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yesss exactly

Copy link
Contributor

mergify bot commented Sep 27, 2025

This pull request is in conflict. Could you fix it @saikishor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-jazzy Triggers PR backport to ROS 2 jazzy.
Projects
Status: Kilted
Development

Successfully merging this pull request may close these issues.

2 participants