Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does performance decrease when removing / inserting models?

I've a world plugin that does the following:

  • Insert a model (in this contrived example it's a simple sphere)
  • Run for 5 seconds simulation time
  • Measure the elapsed real time, calculate and print the real time factor, and remove the model
  • Repeat

This is a rather contrived simplification of a legitimate use case. I'm doing this with the server only, i.e. no GUI, in Gazebo 6.1. Even though the performed simulation is exactly the same each time, the real time factor decreases rapidly. The decrease is actually superlinear (quadratic?), as evidenced by this plot of the real time factors:

image description

It would therefore seem that something related to the old models lingers and slows everything down. I'd like to investigate and hopefully solve this issue, but I have no idea what could be causing this. My question, therefore, is whether anyone has an idea where this might come from?