-
Notifications
You must be signed in to change notification settings - Fork 498
Wheel plowing approximation in ODEPhysics #3164
Conversation
To run the example : |
I've updated this and marked it ready for review |
This builds on the implementation of the plowing effect from the aditya/contact_pts branch to implement a model of longitudinal wheel plowing effects on deformable terrain discussed in #3085. The approach rotates contact points and normals forward to approximate the normal pressure distribution when plwing through deformable soil. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
* Removed unused code * Added example world and model directory * Added plowing_wheel and plowing_terrain sdf tags Signed-off-by: Aditya <aditya050995@gmail.com>
* Rename GetRotationAngle as deadband_saturation * Use gz instead of ignition for the xmlns * Nest wheel parameters inside <gz:plowing_wheel /> * Move plowing_effect models to test/models * Comment out ROS plugins from demo world Signed-off-by: Steve Peters <scpeters@openrobotics.org>
ce56ccf
to
3ec7416
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor warning:
[Err] [InsertModelWidget.cc:403] Missing model.config for model "/gazebo-ws/shared/gazebo/test/models/test_nested_urdf"
[Err] [InsertModelWidget.cc:403] Missing model.config for model "/gazebo-ws/shared/gazebo/test/models/testdb"
but looks good to me!
* Add Aditya as model author * Return 0.0 instead of 0 * Fix typo: THe Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Add static helper function to ODECollision for parsing wheel parsing parameters. Use _verbose flag to optionally print error messages if invalid parameter values are detected. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
This PR implements unit tests for plowing effect feature. Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
* Remove unused variable callbackCountRigidTerrain_ * Fix whitespace in model.sdf * plowing_effect_test.world: set model pose instead of link pose, and raise spheres above ground level by setting initial Z coordinate to value of radius Signed-off-by: Steve Peters <scpeters@openrobotics.org>
* Fix calculation of longitudinal unit vector and expect that longitudinal velocity and contact unit normal vector oppose each other. * Update model plowing parameters to ensure max plowing is reached. * Test contacts at rear wheel instead of front since they are more stable and expect matching contact point at each time step. * Print one debug message for each plowing state. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Improve stability of contact points through softened kp and kd, and small max_vel and min_depth values. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
tests have been kindly provided by @deepanshubansal01 in #3229, and I have made some small adjustments:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well.
To be precise, the plowing effect applies in the direction normal to |
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
* Move tricycle demo world to test folder since its models aren't installed and rename to plowing_effect_tricycle_demo.world * Rename spheres test world to plowing_effect_spheres_test.world Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
I've added documentation in several recent commits; let me know what you think @adityapande-1995 and @deepanshubansal01 |
Looks good to me ! |
Looks good to me as well ! |
As noted in #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.
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 theplowing_effect_*
models intest/models
for examples.