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

[ROS2] diagnostic_updater::Updater has not method for caller to control update() #188

Open
tgreier opened this issue Feb 24, 2021 · 1 comment
Labels
enhancement This tackles a new feature of the code (and not a bug) ros2 PR tackling a ROS2 branch

Comments

@tgreier
Copy link

tgreier commented Feb 24, 2021

I would like to have control over the threading of the diagnostics update, instead of using a node timer (which could block other callbacks).
For diagnostics updater, I'd want option to create a low-level thread that will handle the call to update().

I can do a pull request to implement this, but I would like to know if there was a reason for this change from ROS1->ROS2.
ROS1 gave the responsibility of calling update() to the application instead of creating a timer internal to the updater.

@Karsten1987
Copy link
Contributor

I guess that's a fair use-case. The timer seemed to me the most ROSifed way to handle a constant update rate, but I totally see your need for taking care of threading yourself.

If you have already an idea in mind, please go ahead and draft a PR. I will say though that the timer approach should still be supported, in a way to have a "fire and forget" solution for it, where users don't have to deal with threading themselves.

As a side note, there is a new callback group executor solution in ROS right now, which lets you add callbacks to different callback groups so that these groups don't block each other. Maybe that's a solution for you as well? For more details about it see ros2/rclcpp#1218

@Karsten1987 Karsten1987 added enhancement This tackles a new feature of the code (and not a bug) ros2 PR tackling a ROS2 branch labels Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This tackles a new feature of the code (and not a bug) ros2 PR tackling a ROS2 branch
Projects
None yet
Development

No branches or pull requests

2 participants