Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo takes up 1 core when physics is paused

asked 2015-12-21 20:11:58 -0500

AbdealiJK gravatar image

I'm trying to use gazebo on a fairly old laptop of mine - a core 2 duo with 2 gb ram. I'm using Lubuntu 14.04 (with ROS indigo + gazebo2)

I ran gazebo using gzserver (no GUI) and paused the physics of gazebo and was checking cpu resources on top (a task manager) - No GUI + physics = RAM is less than 500 MB and CPU usage is 100% for both the cores (And cpu temperature rises up to 70s) - No GUI + Paused physics = RAM is less than 500 MB and CPU usage is 100% for 1 core (And cpu temperature for that core rises up to 70s)

Finally, I have 3 questions:

  1. Why is gazebo taking up 100% cpu when physics is paused ? Is this expected ?
  2. How do I throttle the resources gazebo can take ? I don't want the CPU temperature to go higher than ~60s. Is there a method for me tell gazebo to only work 50% of each core at maximum or something ? (Obviously the simulation will be slower, I don't mind that)
  3. Is there any generic way for me to figure out which function in a node is taking up most of the processing power ? How do I profile it ?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-12-22 20:14:55 -0500

scpeters gravatar image

If you aren't using cameras, you can try to disable rendering by setting an invalid DISPLAY variable in the terminal where you launch gzserver.

In terms of the CPU load for pure physics, please try adjusting the real_time_update_rate parameter (units of Hz). This is an upper limit on the number of physics time steps that will be taken per second. Multiplying this parameter by the time step size will yield the desired real time factor (default 1000 Hz * 1 ms = 1.00 real time factor). This parameter can be set in the sdf world file (see an example world).

You can also use the command line tool gz:

gz physics -u 1000
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-12-21 20:11:58 -0500

Seen: 681 times

Last updated: Dec 22 '15