0
$\begingroup$

I recently started testing Gazebo Fortress and I am currently struggling with the RTF (Real Time Factor). I have a world.sdf which includes four different models and one of them is a ground plane. With Gazebo Fortress, I receive 0.9~1.0 RTF (sometimes it even drops to 0.8 RTF) whereas with Classic Gazebo (gazebo-11.0) I receive 1.0 RTF. Also I checked whether Gazebo Fortress utilizes GPU for physics and it turned out that wasn't the case. (I checked through nvidia-smi)

There are no plugins in this world.sdf.

Since the SDF file is too long to paste it here, I'm sharing the link: world.sdf

This is the command that I used for testing: ign gazebo -r world.sdf

I'm running both of the gazebo versions on ROS 1 Noetic.

My questions are:

  • Should I expect a slowdown in the new gazebo compared to previous one?
  • How should I check if new gazebo properly utilizes GPU for the simulation (especially physics computation)? In nvidia-smi it shows nothing.
$\endgroup$

1 Answer 1

0
$\begingroup$

I receive 0.9~1.0 RTF (sometimes it even drops to 0.8 RTF) whereas with Classic Gazebo (gazebo-11.0) I receive 1.0 RTF.

I have no idea where the difference between both could come from, I also see some volatility in the value although on my system but I think it has nothing to do with the real performance of what the new Gazebo could achive.

Modifying the real_time_factor in the SDF code in my case makes the RTF going beyond 1 (set it to -1 if you can to run as fast as possible):

<physics name='default_physics' default='0' type='ode'>
<real_time_factor>1.01</real_time_factor>
...

Should I expect a slowdown in the new gazebo compared to previous one?

I think that @JRTG explained well here: the Gazebo refactoring from Gazebo Classic to the new Gazebo was done with some interesting goals in mind that should help with performance depending on the scenarios and features.

Are we expecting the same performance in a Simulation using ogre1 (Gazebo Classic) vs one using ogre2 (default in gz-sim, can be changed to ogre1 to gain rendering performance)? Not probably. Gazebo Classic also uses ODE as physics engine while the new Gazebo uses DART. Depending on the scenarios one can better than the other in terms of performance.

Summarizing: it's difficult to say if Classic or the new Gazebo are better for performance without having highly depending on the context and the use case.

How should I check if new gazebo properly utilizes GPU for the simulation (especially physics computation)? In nvidia-smi it shows nothing.

As far as I can tell, there is no supported physics engine nowadays that support GPU acceleration and it has been fully integrated with Gazebo. Bullet3 seems to have some support for it but the integration of Bullet3 in Gazebo is not fully complete (although can be tried).

$\endgroup$
2
  • $\begingroup$ Thank you for your detailed response! Unfortunately, even if I run it with RTF set to -1, it still is worse than Classic Gazebo. Honestly, I'm not sure if DART is better than ODE. According to this article it lacks a lot of features than ODE. If I remember correctly, in Ignition Gazebo, it's possible to change the physics engine. Do you think it'd help increasing the RTF? $\endgroup$
    – Usamex
    Nov 10, 2023 at 9:10
  • $\begingroup$ Physics is far from being my area of expertise so can not advise sorry. There was a ROSCon talk with a comparison of the different physics engines: vimeo.com/107517366. The Allison's article that you linked don't have a date but I'm sure is some years old and might no be updated. New Gazebo supports different engines, gazebosim.org/api/gazebo/6/physics.html. $\endgroup$ Nov 10, 2023 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.