Robotics StackExchange | Archived questions

How to change Gazebo client framerate?

It's a simple question for which I couldn't find anything online. Is it possible to set the framerate of the Gazebo Client at launch?

FPS indicator

I am having issues with my real-time factor reducing down to 0.3 and below. But this isn't acceptable since my control algorithms among other things start messing up with this unexpected "sluggishness" of the simulated robot.

I wouldn't mind compensating with a framerate of 16 FPS just to get the real-time factor higher. The GUI alone unnecessarily consumes as much as 20% of my system.

image description

Apologies if such functionalities are staring at me in the face but I literally got 0 results with the search term "Gazebo framerate". Thanks in advance!

Specifications:

Asked by reubenjohn on 2017-01-25 09:05:28 UTC

Comments

Answers

FPS in the GUI does not affect the real-time factor. The real-time factor represents the ratio of real time required by the physics engine to the amount of time simulated.

You can try running gazebo without the client, and you should see the same real-time factor.

What version of Gazebo are you using, what are your system specs, and what are you simulating?

Asked by nkoenig on 2017-01-25 09:49:46 UTC

Comments

Sorry, added the missing Specifications section. Ideally, the client shouldn't reduce real-time factor, but during simulation, all 4 cores peak to 100%, and real-time factor drops from 1.00 -> ~0.3. This indicates that the drop in real-time factor is at least partly attributed to the gzclient consuming ~20% on each core.

Asked by reubenjohn on 2017-01-26 04:27:23 UTC

@nkoenig, even if FPS doesn't affect real-time factor, it would be good to control the frame rate to reduce overall CPU load. Is this something that is already implemented?

Asked by JLiviero on 2017-01-26 09:27:13 UTC

There is no easy mechanism to change the frame rate. You can compile Gazebo from source and change the default render rate. You can also offer a patch to Gazebo the make it easier to adjust the FPS rate.

Asked by nkoenig on 2017-01-26 10:26:16 UTC

Thanks, I'll consider adding a parameter for this purpose at launch.

Asked by reubenjohn on 2017-01-26 13:22:52 UTC