Fix Gazebo Real Time Factor

asked 2018-03-01 04:16:09 -0500

LukeT gravatar image

updated 2018-03-01 04:37:43 -0500


I am currently using Gazebo version 7 with ros kinetic in a Virtual Box vm and I am implementing a controller in simulink on my actual desktop. I am able to subscribe to messages in simulink at a fixed rate. However, my plots including time (from /clock topic) look "jerky". I suspect that this is because simulink is recording data in fixed steps in realtime but the value of Gazebos real time factor is slightly fluctuating. With my current simulation it holds very close to a real time factor of 1 (+/- 0.02) but even if I lower this, it still fluctuates slightly.

My question is, is it possible to completely fix (i.e. make static) the real time factor in Gazebo (preferably in my sdf .world file).

Below is my physics section from my .world file in case I have missed something.

<physics name="ode_200iters" type="ode" default="true">
    <gravity>0 0 -1</gravity>

Thanks, Luke

edit retag flag offensive close merge delete