Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

asked 2019-11-26 15:54:25 -0600

benjmitch gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-03 14:13:37 -0600

rahul gravatar image

To work with a model in Gazebo, you need to specify correct inertial tensor in the collision elements of its urdf/xacro file. If they are wrong, Gazebo will not simulate them properly as underlying physics doesn't know how to correct them. Model drifting, toppling, skidding without actuation is a common scenario in this case, as usually, the Center of Mass or Center of Gravity is not at equilibrium.

edit flag offensive delete link more

Comments

Thanks, rahul, however I do not think this is the issue. All my links have mass and inertia matrices that are realistic, and physics usually behaves normally. Moreover, this problem does not develop until 20 seconds into the simulation, when the velocity freezes (at a non-zero value). I think that indicates some other problem, do you agree?

benjmitch gravatar imagebenjmitch ( 2019-12-03 14:26:11 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-11-26 15:54:25 -0600

Seen: 46 times

Last updated: Dec 03