Gazebo | Ignition | Community
Ask Your Question

Models move when increasing gazebo sim time

asked 2016-03-30 13:12:43 -0500

lucas gravatar image

I have been working on increasing the Gazebo speed in order to run my simulations quicker. I have been increasing speeds incrementally and solving the bugs that arise. Now, I've found a bug that I'm not too sure how to fix.

The problem I am seeing is that as I increase the simulator speed, some models seem to slowly move on their own when they should be sitting still.

There are two examples of this in my current simulation.

The first is with my robot. I am using the AR Drone tum_simulator library as my model. While this model sits on the ground it slowly vibrates around, the more I increase the gazebo speed, the more it vibrates. At lower speeds it just kind of vibrates in place. However, at higher simulation speeds, it actually begins vibrating enough to move around the world. This is without any commands being sent. The drone is in the default loaded position for the library.

The problem doesn't just exist with this particular drone though. I added some background objects that are just there for decoration. One of the background objects is the person_standing (I believe this is a default gazebo model, but not 100% sure). It is just a person standing there that is never supposed to move, but as I increase the simulator speed, the person very slowly moves randomly around the world.

I do have other background objects that don't move, or at least, don't move enough to be noticeable. I haven't actually checked the exact position values to be sure.

Initially, I thought this was due to the ARdrone library implemtation. I thought it might have to do with the noise of the ARdrone movement that makes it not hover in the exact spot and makes it simulate drifting around slightly. But after seeing the person model move, I'm not so sure. I thought I might be missing something.

I was hoping someone might give me some insight on why this is happening? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-30 15:38:16 -0500

nkoenig gravatar image

I assume you are increasing simulation speed by increasing the physics time step size. Physics becomes more unstable (increased error) as the time step size is increased. There is really no way around this. If you want speed you have to trade off accuracy.

You can make background objects <static>true</static>, assuming that they do not need to move.

If you don't need dynamic objects, then you can make everything <kinematic> which should stop the jitter and allow you to run very fast.

edit flag offensive delete link more


I am increasing speed by using max_step_size under physics. The static true solved my background problem. However, the robot I am controlling needs to be dynamic, so I can't go that route. As to the simulation becoming less accurate, I know it depends on what you are running, but I was curious what speedups you might have successfully used? I'm still trying to fix some errors at 0.02 and I'm not completely sure that speed will work. At higher speeds, it seems to completely break.

lucas gravatar imagelucas ( 2016-03-30 17:36:05 -0500 )edit

Question Tools

1 follower


Asked: 2016-03-30 13:12:43 -0500

Seen: 1,263 times

Last updated: Mar 30 '16