Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why would a model move on its own across a surface?

Hi,

Working in Gazebo 7.16, I have a world with a mobile model, which - in this case - is not being actuated, sat on a surface. All the three contact collision objects of the model are meshes. The surface collision object is a "box".

I understand why the model skitters about on the surface ever so slightly all the time. The physics (ODE) is running at 1kHz.

However, after nearly 20 seconds of sitting fairly still, the model suddenly starts moving backwards at a significant rate (about 1mm/sec). I report the log, below, of time and the three components of GetRelativeLinearVel(). You can see that at about 19.94 seconds the velocity suddenly stops changing and it is here that the movement I observe in gzclient begins.

One additional clue - the velocity doesn't actually stop changing completely, rather it appears to settle quickly in a first-order manner to some fixed value.

It looks a lot like idle behaviour from the physics engine, I guess, but I haven't been able to find any documentation on this or any way of turning it off. SetAutoDisable(0) seemed like a good bet, but had no effect. And nothing I can find on the Get*() interface sheds any light. I can tell you that calling SetLinearVel(math::Vector3()) on the link at every sample (i.e. zeroing its velocity) eliminates the drift, but clearly isn't a solution I can take forward.

Another clue - if I call SetLinearDamping(0.1) on the offending link, then the behaviour begins earlier - presumably just a change in the initial conditions, then. More interestingly, the value settled on for the velocity is [-0.008143 9.9e-05 -0.006751] - that is, very similar to in the trace below, but not identical.

So my question is - does anyone recognise this and is able to point me in the right direction, please? My preferred answer would clue me in on how to disable whatever optimisation is triggering here, if indeed that is what is happening, and how I can disable it - either globally or for individual links.

Thanks in advance for any help.

19.6800    0.0007   -0.0024    0.0000
19.7000   -0.0016   -0.0021    0.0010
19.7200   -0.0022   -0.0019    0.0011
19.7400   -0.0020   -0.0021    0.0013
19.7600   -0.0033    0.0011   -0.0096
19.7800    0.0022   -0.0033   -0.0004
19.8000   -0.0010   -0.0026    0.0001
19.8200   -0.0013   -0.0002   -0.0017
19.8400   -0.0001   -0.0024   -0.0001
19.8600   -0.0013   -0.0022    0.0006
19.8800   -0.0022   -0.0020    0.0010
19.9000   -0.0038    0.0010   -0.0106
19.9200   -0.0035    0.0001   -0.0056
19.9400   -0.0081    0.0001   -0.0069
19.9600   -0.0081    0.0002   -0.0068
19.9800   -0.0082    0.0002   -0.0068
20.0000   -0.0082    0.0002   -0.0068
20.0200   -0.0082    0.0002   -0.0068
20.0400   -0.0082    0.0002   -0.0067
20.0600   -0.0082    0.0002   -0.0067
20.0800   -0.0082    0.0002   -0.0067
20.1000   -0.0082    0.0002   -0.0067
20.1200   -0.0082    0.0002   -0.0067
20.1400   -0.0082    0.0002   -0.0067