Gazebo | Ignition | Community
Ask Your Question

CPU/GPU/RAM utilization low but real time factor 0.1 with 100 actors

asked 2022-01-27 04:33:47 -0500

joshuacv gravatar image

I have a pretty good simulation PC - gazebo and ROS are running in a chroot (I also tried outside the chroot). I am trying to simulate a swarm of robots. Problem is that the real time factor goes to the gutter exponentially. My actors arent that complicated - basically a diff controller, laser scan, wheels and a body on top. And even if they dont do anything (no publishing), the real time factor gets really low.

image description

Funnily enough the CPU, GPU and RAM utilization do not seem to be so high (CPU: ~30%, GPU:~1%(headless), RAM: 40%).The gzserver process only uses about 12% of the CPU. Does anyone know where the bottle neck is? Is real time factor related to the number of actors/joints etc directly?

Manually changing max_step_size does bring up the real time update rate but this just means that gazebo does less computation instead of default 1000 times per second. But, why doesnt gazebo use all the CPU available? The only way I could get gazebo to use more CPU was to start mutliple instances of gazebo parallely.

I have seen several vague answers that claim that when the model is "complex", the real time factor goes low. But does anyone know why?

Some things that I have unsuccessfully tried (just to avoid answers suggesting things that I have already tried):

  1. Collisions: I tried turning off collisions by commenting out collisions in urdf files and simplifying the collision models to use simple shapes.

  2. Reduce CPU load: I tried removing laser scanner from the model and also use the gpu_ray plug in to improve CPU availability (although CPU seems to be under utilized anyway).

  3. Simplify my model and use threads: I did a quick test with this very simple bot (basically a rectangle with wheels). Adding 100 of them gave a real time factor of 0.25 and CPU is still under utilized (total CPU load around 20% and gzserver using 12%). Using threads: According to, I played around with island threading and finally got a 0.5 RT factor (for the simple robot model above) but with a total of 40% CPU load (gzserver was using only 20%).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-02-16 18:50:52 -0500

lapyx gravatar image

Which type of gazebo version are you using? I was also faced with a similar issue and figured out that rtf is much better with ignition gazebo 5.3.0

edit flag offensive delete link more


I am using gazebo-9. I ended up optimizing my model and running with a lesser update rate for now. My models vibrate and misbehave a bit but I until there is a better solution (and ignition is more stable), I will make do with this gazebo version for now :).

joshuacv gravatar imagejoshuacv ( 2022-03-02 00:27:54 -0500 )edit

Question Tools

1 follower


Asked: 2022-01-26 02:57:12 -0500

Seen: 2,223 times

Last updated: Jan 27 '22