ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Real Time Factor going really low


#1

My simulation is going lagging at some points. If I check the real time factor presented by Gazebo, it goes as low as 0.32.

Is that expected? I have an i7-6700 CPU, 16GB RAM, and a GTX 1070 but still does not seem to be enough. I understand that the ODE physics engine underneath Gazebo does not make use of a GPU, like bullet3.

However, why the suddenly drop in performance? Why does it not go back to 0.99 or 1.0 even when the experiment is over?

[Start of the simulation]
Factor[1.00] SimTime[6.17] RealTime[7.81] Paused[F]
Factor[1.00] SimTime[6.38] RealTime[8.01] Paused[F]
Factor[1.00] SimTime[6.58] RealTime[8.21] Paused[F]
Factor[1.00] SimTime[6.78] RealTime[8.41] Paused[F]
Factor[1.00] SimTime[6.98] RealTime[8.61] Paused[F]
Factor[1.00] SimTime[7.18] RealTime[8.81] Paused[F]

[At one of the points where if goes lagging]
Factor[0.46] SimTime[121.83] RealTime[154.42] Paused[F]
Factor[0.48] SimTime[121.93] RealTime[154.62] Paused[F]
Factor[0.48] SimTime[122.02] RealTime[154.82] Paused[F]
Factor[0.48] SimTime[122.07] RealTime[155.03] Paused[F]
Factor[0.48] SimTime[122.16] RealTime[155.23] Paused[F]
Factor[0.47] SimTime[122.25] RealTime[155.43] Paused[F]
Factor[0.47] SimTime[122.35] RealTime[155.63] Paused[F]
Factor[0.47] SimTime[122.45] RealTime[155.83] Paused[F]
Factor[0.47] SimTime[122.55] RealTime[156.03] Paused[F]
Factor[0.47] SimTime[122.65] RealTime[156.23] Paused[F]
Factor[0.47] SimTime[122.75] RealTime[156.43] Paused[F]

[Nothing is moving, competition done]
Factor[0.68] SimTime[298.30] RealTime[436.40] Paused[F]
Factor[0.68] SimTime[298.44] RealTime[436.60] Paused[F]
Factor[0.68] SimTime[298.57] RealTime[436.80] Paused[F]
Factor[0.69] SimTime[298.71] RealTime[437.00] Paused[F]
Factor[0.69] SimTime[298.84] RealTime[437.20] Paused[F]
Factor[0.70] SimTime[298.96] RealTime[437.41] Paused[F]
Factor[0.70] SimTime[299.09] RealTime[437.61] Paused[F]


#2

Hi @rra, the realtime factor is strongly influenced by the number of parts in the ARIAC environment. This is why different scenarios will have different realtime factors. The RTF doesn’t go back to 1.0 after the trial is over because the models are still in the environment (just not in their original position).

If you manually move/add/delete any models in the environment the RTF will drop temporarily. If you are experiencing a low RTF temporarily, but then it recovers, this may be the cause.

If you are just experiencing a low RTF in general, removing unnecessary models from the environment during development will help. We have added the “Improving real-time factor during development” section in the competition configuration file documentation which details how to temporarily disable some models.

Hope this helps.