I’m having an issue with the differential drive on my robot. The official URDF/USD models for my robot do not include a caster wheel, so I tried to add a custom caster by attaching a simple sphere.
However, when I control the robot using ROS2 and OmniGraph, it suddenly starts to turn on its own while trying to move straight.
Here is what I have tried so far to troubleshoot the issue:
Adjusting Drive Gains: I have tried adjusting the drive gains on the main wheels extensively. I tested Damping values from 1 all the way to 10,000,000 and also tried various Stiffness values, but the turning problem persists.
Investigating the Custom Caster: I suspected the issue might be my custom sphere caster. However, when I completely removed it, the robot became physically unstable (having only two points of contact) and would flip over, so I could not test its movement this way.
I have attached a video showing the robot turning unexpectedly, even with the drive Damping set to 10,000.
I hesitated to ask because I thought this might be a silly question, but I’ve been stuck on this for several days. Any help or suggestions would be greatly appreciated. Thank you
The unexpected turning of your differential drive robot after adding a custom spherical caster might arise from incorrect modeling or configuration of the caster’s physical properties or constraints.
Things to check
Friction and Damping of the Caster:
If the caster wheel (modeled as a sphere) does not have properly tuned friction and damping parameters, it can generate lateral (sideways) forces or even stick and steer the robot unintentionally. In differential drives, every unbalanced force or excess friction at the caster can introduce a net yaw (turning) torque.
Physics Constraints or Joints:
If the caster does not use a correct joint type (such as a free or passive joint) or is fixed in a way that prevents free rotation along the desired axes, it can act as a pivot, causing the robot to rotate as it tries to move forward.
Caster Placement:
Incorrect placement (not perfectly aligned along the robot’s centerline, or set at an incorrect height so it’s not just barely contacting the ground) can lead to uneven force distribution, which can make the robot turn when it should move straight.
Recommendations
Joint Configuration:
Make sure that in your USD/URDF, the caster sphere is attached via a joint that allows it to spin freely in the plane perpendicular to gravity. Typically, this is a continuous (revolute) joint or a combination of planar/prismatic joints. For a true caster, both spin and tilt are ideally free.
Friction Parameters:
Lower the lateral and rolling friction coefficients for the sphere, either in the USD (under physicsMaterial) or via the contact material properties, so that it has minimal resistance to rolling in any direction but does not cause slippage.
Caster Position:
Double-check that the caster is perfectly centered with respect to the intended axis of motion (usually along the robot’s longitudinal center) and that it is not offset, which would naturally cause torque.
Common Pitfalls
Using a fixed joint for the caster, making the robot behave as a tricycle rather than a differential drive.
Over-sized spheres or misaligned spheres that make too much contact with the surface.
Default (excessive) friction or damping values.
Correcting the caster’s physics properties and joint type will resolves this type of issue in most cases.