gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
621 stars 251 forks source link

Port wheel plowing model from gz-sim #2328

Open scpeters opened 4 months ago

scpeters commented 4 months ago

Desired behavior

As there are many applications of wheeled robots driving on deformable terrain / soft soil, there is a use case for simulating the behavior of wheels in deformable terrain. This is challenging for physics engines that use rigid shapes for collision detection and contact resolution. A model of the plowing effect of wheels moving in deformable terrain was proposed based on changing the contact point position and normal direction based on the wheel's velocity (see https://github.com/gazebosim/gazebo-classic/issues/3085) and implemented for the gazebo-classic fork of ODE in https://github.com/gazebosim/gazebo-classic/pull/3164. An extension providing a nonlinear plowing effect was proposed in https://github.com/gazebosim/gazebo-classic/pull/3342, though it was not merged since ABI compatibility would have been broken.

This issue will be complete when this functionality has been ported to gz-sim with required changes in gz-sim, gz-physics, and a physics engine supported by gz-physics (likely dartsim, see also https://github.com/gazebosim/gazebo-classic/issues/3163).

Alternatives considered

Implementation suggestion

The existing implementation in gazebo-classic's fork of ODE is implemented in a contact callback function. A similar mechanism should be found for a physics engine supported by gz-physics to modify contact points and normals after narrow-phase collision detection but before contact constraints are created. Once this functionality has been added to a supported physics engine, the feature should be exposed in gz-physics and gz-sim.

Additional context

azeey commented 3 months ago

A mechanism for customizing contact point properties was added in https://github.com/gazebosim/gz-physics/pull/267. Hopefully it's sufficient, but if not it should be a good starting point.