Robotics StackExchange | Archived questions

Using an external simulation clock

Is it possible to use Gazebo with an external simulation clock source? E.g. have use_sim_time:=true but have the /clock topic published by another process? I'm using ROS:kinetic w/ Gazebo7

I'm trying to glue together some non-ROS programs with Gazebo. One of these monolithic beasts provides a sim clock over UDP and it'd be much easier to write some middleware to pipe it into /clockto set the pace instead of adapting it to use any real of ROS in the short-term (eventually we'd move in that direction).

Asked by berkowski on 2017-05-04 12:37:28 UTC

Comments

Hi, I know this was posted long time ago... but I have the same issue, did you find a solution?

Asked by iAba on 2018-03-21 06:06:13 UTC

Answers

Gazebo is not setup to consume an external clock. You could write a plugin to Gazebo that controls simulation based on a different clock. For example, your plugin could start simulation paused and subscribe to your custom clock topic. Then, you'd have to step simulation based on the clock information. This will only work if your simulation can run at the same speed or faster than your clock.

Asked by nkoenig on 2018-03-21 09:22:30 UTC

Comments