Gazebo | Ignition | Community
Ask Your Question
0

Gazebo 6 update rate settings

asked 2016-05-06 03:13:56 -0600

Brosseau.F gravatar image

Hello everybody,

I am working with Gazebo 6 and I would like to decrease CPU consommation.

I saw many post on this and for example this one : http://answers.ros.org/question/35699/gazebo-real-and-simulation-time/

But when I try to set the update rate to a negative value in the world file, Gazebo run as fast as possible (gzserver at 305% CPU on an empty world).

<physics type="ode">
        <max_step_size>0.001</max_step_size>
        <real_time_factor>1</real_time_factor>
        <real_time_update_rate>-1</real_time_update_rate>
        <gravity>0 0 -9.8</gravity>
</physics>

I would like the simulation to run real time factor without using 100% CPU for an empty world.

Is this behavior should work with max_step_size set to 0.001 and real_time_update_rate set to 1000 ?

Is there a configuration problem with my computer ? (I7 - nvidia GTX 850m)

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-10 11:31:50 -0600

nkoenig gravatar image

A negative value for <real_time_update_rate> will cause Gazebo to run as fast as possible, and will therefore consume as much CPU as possible.

If you want to run in real time, set the <real_time_update_rate> to be 1.0/<max_step_size>.

When I run gzserver with an empty world, I get around 7.3% CPU usage. Can you try running just gzserver?

edit flag offensive delete link more

Comments

I run gzserver as you said and I have 6% CPU usage. When I run an empty world using roslaunch and launch file I get 13 % CPU usage for gzserver. But gzclient is always at 100% CPU usage. Is this the expected behavior ?

Brosseau.F gravatar imageBrosseau.F ( 2016-05-11 02:36:05 -0600 )edit

Running gzserver through roslaunch shouldn't double the CPU usage. That requires some exploration. Gzclient will consume 100% CPU.

nkoenig gravatar imagenkoenig ( 2016-05-11 09:27:19 -0600 )edit

Ok thanks for your answer.

Brosseau.F gravatar imageBrosseau.F ( 2016-05-18 02:37:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-06 03:13:56 -0600

Seen: 7,376 times

Last updated: May 10 '16