How to synchronize multiple Gazbo simulation across multiple Gazebo masters?

asked 2019-05-22 02:38:27 -0500

kumpakri gravatar image

I'm running two ROS masters, each ros masters is connected to different Gazebo master and I'm using the Multimasters -FKIE package to connect the two ROS masters. I need a robot in the first simulation to react on signal from the second simulation (when message from simulation 2 comes, robot in simultion 1 plans and executes some trajectory). I have experience much trouble with this setup and after exhausting experimentation the lead seems to point at the timing.

Each of the simulation are launched at different time and are running at different RT factor. When I toy with pausing one of the simulations to get the times kind of equal, the setup starts working for small time interval and then stops working again.

image description

So I'm thinking I need a way how to force the simulations to share the time. Is there any way how to do this?

edit retag flag offensive close merge delete