Adds a nonlinear effect to the wheel slip model (not for merging due to ABI breaks)
Summary
Driving on deformable terrain can currently be modeled using the ode physics engine in Gazebo using the WheelSlipPlugin to get a linear slip model (steady wheel slip roughly proportional to the slope angle when driving uphill or downhill) and the plowing parameters added in https://github.com/gazebosim/gazebo-classic/pull/3164. In cases for which the linear slip model only matches experimental data within a particular range of slope angles, a nonlinear aspect to the model would be useful.
This pull request adds a nonlinear wheel slip effect in ODEPhysics in the portion of the contact callback function where the wheel plowing model is currently implemented. This nonlinear effect iterates over each contact point/normal pair and computes for each pair an equivalent slope angle from the projection of gravity and some other body forces into the wheel's longitudinal/normal plane. For each pair of collisions in contact, the equivalent slope angle is averaged over the set of contact points for that collision pair. If the equivalent slope is below the lower threshold or above the upper threshold, the longitudinal slip compliance is altered in proportion to the difference from the threshold according to the following equation:
The slope threshold values are specified in degrees in the //nonlinear_slip/lower/degree and //nonlinear_slip/upper/degree parameters with the proportionality parameters are specified in //nonlinear_slip/lower/per_degree and //nonlinear_slip/upper/per_degree
The loads a world with two tricycles driving "uphill" against an inclined gravity vector on a flat plane. The inclination angle of the gravity vector is larger than the upper nonlinear slope threshold, so the nonlinear effect causes that tricycle to reach a reduced linear speed compared to the other tricycle with no nonlinear slip parameters. Reducing the gravity inclination below the threshold (such as with gravity of -1 0 -9.75) will cause both tricycles to drive at the same speed, since their slip parameters will be identical.
Checklist
[ ] Signed all commits for DCO
[ ] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🎉 New feature
Adds a nonlinear effect to the wheel slip model (not for merging due to ABI breaks)
Summary
Driving on deformable terrain can currently be modeled using the
ode
physics engine in Gazebo using theWheelSlipPlugin
to get a linear slip model (steady wheel slip roughly proportional to the slope angle when driving uphill or downhill) and the plowing parameters added in https://github.com/gazebosim/gazebo-classic/pull/3164. In cases for which the linear slip model only matches experimental data within a particular range of slope angles, a nonlinear aspect to the model would be useful.This pull request adds a nonlinear wheel slip effect in ODEPhysics in the portion of the contact callback function where the wheel plowing model is currently implemented. This nonlinear effect iterates over each contact point/normal pair and computes for each pair an equivalent slope angle from the projection of gravity and some other body forces into the wheel's longitudinal/normal plane. For each pair of collisions in contact, the equivalent slope angle is averaged over the set of contact points for that collision pair. If the equivalent slope is below the lower threshold or above the upper threshold, the longitudinal slip compliance is altered in proportion to the difference from the threshold according to the following equation:
The slope threshold values are specified in degrees in the
//nonlinear_slip/lower/degree
and//nonlinear_slip/upper/degree
parameters with the proportionality parameters are specified in//nonlinear_slip/lower/per_degree
and//nonlinear_slip/upper/per_degree
Test it
test/models
from the local clone of the gazebo-classic source repository to theGAZEBO_MODEL_PATH
variableThe loads a world with two tricycles driving "uphill" against an inclined gravity vector on a flat plane. The inclination angle of the gravity vector is larger than the upper nonlinear slope threshold, so the nonlinear effect causes that tricycle to reach a reduced linear speed compared to the other tricycle with no nonlinear slip parameters. Reducing the gravity inclination below the threshold (such as with gravity of
-1 0 -9.75
) will cause both tricycles to drive at the same speed, since their slip parameters will be identical.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.