-
Notifications
You must be signed in to change notification settings - Fork 781
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
Increase /clock frequency #1211
Comments
btw, I should add that we couldn't figure out a way to actually use the parameter "update_rate". There doesn't seem to be a way to pass it to the plugin. |
The "update_rate" is being throttled, there's another parameter called "publish_rate": gazebo_ros_pkgs/gazebo_ros/src/gazebo_ros_init.cpp Lines 174 to 176 in 204abd4
Did you try that one? The default is 10Hz, modifying it sounds ok to me. This sounds like a lack of docs problem to me, I'm not sure where to document this though... |
Hello, just to add my comments because I am having similar issues (using ros foxy). Regarding the use of the BTW I'd say if clock rate is intended to be configurable, it would be nice to expose it as a launch arg in The inability to set the clock rate is causing problems for me, because as far as I can tell, the clock publish rate limits the rate at which I'm not sure if this limiting of spin rate is expected behavior, or an |
[publish_rate]
We tried that one as well, but the issue is that we cannot pass ROS parameters on the Gazebo command line. For other plugins, their parameters are given in the SDF (when the plugin is used for some model part), but this doesn't work for initial parameters. |
That doesn't seem related to gazebo, just |
@tim-fan Were you able to find any workaround? I also agree that this is something that should be exposed by the launch files. |
Hi @joshnewans, I was not able to set clock rate via params either (maybe this should be listed as a separate issue). For now I'm building the #1214 branch from source, until that gets merged/released. |
#1391 has made it more convenient to set ROS parameters (including |
This appears to be resolved. Please reopen if the issue persists. |
Description
The current default frequency for /clock is 10Hz, which gives 100ms clock resolution for the "now()" call. This is very coarse and represents a huge difference to most real-world robots, where the usable clock precision is in the microsecond range, and also to ROS1, where it used to be 1ms, IIRC. Since all nodes need the sim_time, increasing the frequency has a cost, of course, therefore a balance needs to be found between precision and message sending overhead.
There is a parameter for changing this, but I would say that the default should be reasonable, and in my considered opinion, 10Hz is not reasonable for the reasons outlined above.
Expected behavior
I would suggest to increase the default frequency to 1000, to mimick ROS1 behavior.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: