Skip to content

Conversation

BarisYazici
Copy link
Contributor

@BarisYazici BarisYazici commented Sep 12, 2025

Based on the issue #2529, wanted make it more concrete with the draft PR.
The problem is for Franka robots the read function will be blocking until there is a response from the robot. So the read function will already dictates the control loop frequency. In general for Franka robots, we wouldn't need to even sleep in the ros2_control_node.

Introduces a new parameter enable_overrun to the controller manager, allowing users to disable the overrun detection and warning mechanism. This parameter defaults to true, maintaining the existing behavior.

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding “random fixes” to PRs. Put those on separate PRs.
  2. Give your PR a descriptive title. Add a short summary, if required.
  3. Make sure the pipeline is green.
  4. Don’t be afraid to request reviews from maintainers.
  5. New code = new tests. If you are adding new functionality, always make sure to add some tests exercising the code and serving as live documentation of your original intention.

To send us a pull request, please:

  • Fork the repository.
  • Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
  • Ensure local tests pass. (colcon test and pre-commit run (requires you to install pre-commit by pip3 install pre-commit)
  • Commit to your fork using clear commit messages.
  • Send a pull request, answering any default questions in the pull request interface.
  • Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.

Copy link
Contributor

mergify bot commented Sep 12, 2025

@BarisYazici, all pull requests must be targeted towards the master development branch.
Once merged into master, it is possible to backport to jazzy, but it must be in master
to have these changes reflected into new distributions.

Copy link

codecov bot commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.02%. Comparing base (1845171) to head (7709cba).
⚠️ Report is 2 commits behind head on jazzy.

Files with missing lines Patch % Lines
controller_manager/src/ros2_control_node.cpp 25.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #2540      +/-   ##
==========================================
+ Coverage   88.98%   89.02%   +0.03%     
==========================================
  Files         145      145              
  Lines       16491    16491              
  Branches     1396     1396              
==========================================
+ Hits        14675    14681       +6     
+ Misses       1284     1278       -6     
  Partials      532      532              
Flag Coverage Δ
unittests 89.02% <25.00%> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
controller_manager/src/controller_manager.cpp 75.12% <ø> (+0.18%) ⬆️
controller_manager/src/ros2_control_node.cpp 55.88% <25.00%> (-0.18%) ⬇️

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

Copy link
Contributor

mergify bot commented Sep 14, 2025

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

Introduces a new parameter `enable_overrun` to the controller manager,
allowing users to disable the overrun detection and warning mechanism.
This parameter defaults to true, maintaining the existing behavior.
@BarisYazici BarisYazici force-pushed the feat/disable-overrun-detection branch from 7709cba to 55dffe7 Compare September 16, 2025 13:44
@BarisYazici BarisYazici changed the base branch from jazzy to master September 16, 2025 13:45
@BarisYazici BarisYazici marked this pull request as ready for review September 16, 2025 13:46
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.

I've added more refined parameters in #2546

Please take a look. Test it on your hardware and let us know

cm->get_clock()->sleep_until(current_time + period);
}
else
else if(enable_overrun)
Copy link
Member

Choose a reason for hiding this comment

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

With this we are simply removing the needed sleep too. Is this intended?

Choose a reason for hiding this comment

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

Yes, as stated in your PR -> It seems to be 'impossible' (without more complicated hardware setups), to have a synced loop. Aka, relative to my notebook, the master controller of the robot doesn't run with 1000 hz but in the example yesterday with 1003 hz. Hence, the sleep only works against us but not for us...

Copy link
Member

Choose a reason for hiding this comment

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

IMO, I don't think that part should ever be removed. Sleep is the one that ensures the frequency for everyone.

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.

3 participants