gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.21k stars 484 forks source link

Wheel plowing approximation in ODEPhysics #3164

Closed scpeters closed 2 years ago

scpeters commented 2 years ago

As noted in https://github.com/osrf/gazebo/issues/3085, the distribution of contact forces can be quite different for a wheel driving on rigid terrain and deformable terrain. Contact for rigid wheel on rigid terrain can be modeled with a single contact point and normal direction perpendicular to the surface. For a rigid wheel on deformable terrain, the contact occurs over a larger area. The contact pressure distribution can be approximated as an equivalent point force at the centroid of the pressure distribution. At rest, a wheel on a deformable surface may sink into the surface with a symmetric distribution of normal contact pressure, such that the equivalent normal force vector is parallel to the undisturbed surface normal, which is vertical in the illustration below.

wheel_plowing

While rolling, the sinkage of the wheel may cause a plowing effect, in which the terrain material is bunched up in the direction of travel and compacted in its wake. This can cause a significant forward bias in the distribution of normal contact pressure and an equivalent normal force vector that is inclined relative to the undisturbed surface normal. In the illustration above, the equivalent normal force opposes the motion of the wheel, requiring tractive torque to be applied in order to maintain a steady velocity. Even when flat, the plowing effect means that driving on a deformable surface is energetically equivalent to driving uphill on a rigid surface.

This pull request implements an approximation of longitudinal wheel plowing effects by displacing contact points and inclining the contact normals to replicate the behavior illustrated in the figure above. This is implemented in ODEPhysics::Collide, which is a callback function called for each pair of colliding bodies. To enable the plowing effect, special SDFormat tags must be added to the terrain (<gz:plowing_terrain />) and the wheels (<gz:plowing_wheel />). The wheel must specify <fdir1> in its <surface>, and the <gz:plowing_wheel> tag must also contain <max_degrees> and <saturation_velocity> and may optionally contain <deadband_velocity>. See the plowing_effect_* models in test/models for examples.

adityapande-1995 commented 2 years ago

Left : Vehicle using the plowing effect, right : without the plowing effect image

Wheels sinking into the ground : image

adityapande-1995 commented 2 years ago

To run the example : gazebo --verbose worlds/plowing_effect_demo.world

scpeters commented 2 years ago

I've updated this and marked it ready for review

scpeters commented 2 years ago

tests have been kindly provided by @deepanshubansal01 in https://github.com/osrf/gazebo/pull/3229, and I have made some small adjustments:

scpeters commented 2 years ago

Tests look good ! I feel we should document in the examples / code that the plowing effect only applies in the direction of fdir1 for now.

To be precise, the plowing effect applies in the direction normal to fdir1 and the surface normal. If fdir1 is the wheel's lateral direction, then the plowing effect will apply in the wheel's longitudinal direction. I'll go ahead and add some notes about this in the example model / world

scpeters commented 2 years ago

Tests look good ! I feel we should document in the examples / code that the plowing effect only applies in the direction of fdir1 for now.

To be precise, the plowing effect applies in the direction normal to fdir1 and the surface normal. If fdir1 is the wheel's lateral direction, then the plowing effect will apply in the wheel's longitudinal direction. I'll go ahead and add some notes about this in the example model / world

I've added documentation in several recent commits; let me know what you think @adityapande-1995 and @deepanshubansal01

adityapande-1995 commented 2 years ago

Tests look good ! I feel we should document in the examples / code that the plowing effect only applies in the direction of fdir1 for now.

To be precise, the plowing effect applies in the direction normal to fdir1 and the surface normal. If fdir1 is the wheel's lateral direction, then the plowing effect will apply in the wheel's longitudinal direction. I'll go ahead and add some notes about this in the example model / world

I've added documentation in several recent commits; let me know what you think @adityapande-1995 and @deepanshubansal01

Looks good to me !

deepanshubansal01 commented 2 years ago

Tests look good ! I feel we should document in the examples / code that the plowing effect only applies in the direction of fdir1 for now.

To be precise, the plowing effect applies in the direction normal to fdir1 and the surface normal. If fdir1 is the wheel's lateral direction, then the plowing effect will apply in the wheel's longitudinal direction. I'll go ahead and add some notes about this in the example model / world

I've added documentation in several recent commits; let me know what you think @adityapande-1995 and @deepanshubansal01

Looks good to me as well !