Wheeled models slowly roll when not being driven
Wheeled models have a tendency to slowly roll when not subject to any other force (i.e. by a plugin driving the wheels). I have noticed this with both a URDF Segway-with-casters model and a URDF quad wheeler. I assume the problem is due to noise when calculating contact between the wheels and the ground.
I just worked-around the problem in a diff-drive plugin (based on the ROS erratic diff-drive plugin) in the same way DRC pins joints: When the wheel velocity is set to zero, I zero the wheel joint velocity then insert a static link between the wheel and the world, then remove it when before setting the wheel joint velocity to non-zero.
However this feels like a nasty kluge. Is there any better way of doing it? I was hoping for a model::Joint::setStatic(bool) method or something, but can't seem to find anything like that.
Is your inertia set correctly? If you increase it, the rolling should stop.
Yes, it is. To clarify, it is not a problem that the models keep on moving, rather they start rolling of their own accord when stopped.
What version of Gazebo are you running? And if you zoom in on the wheels, do they appear to jitter?