Robotics StackExchange | Archived questions

Differential drive stutters by driving a circle

Hi,

I have a problem with my simulation of a differential drive robot. I try to let him drive in a circle by setting the velocity to

  // Configure joint motor
  this->jointLeft->SetParam("fmax", 0, torque);
  this->jointRight->SetParam("fmax", 0,torque);

  // Set velocities
  this->jointRight->SetParam("vel", 0, 3.5);
  this->jointLeft->SetParam("vel", 0, 5.0);

It starts to drive a circle, but not as tight as expected. Then it starts to stutter, turns heavier and then the whole procedure starts again. A video of this can be seen here: https://www.youtube.com/watch?v=m4xOmeKiKpw

Hope someone has an idea.

Best

Asked by NRottmann on 2018-10-22 10:19:09 UTC

Comments

The way it shakes up and down makes it look like the wheels are not smooth. Are you using primitive shapes for all 3 wheels? What's the physics engine? Is the caster wheel connected by a ball joint?

Asked by chapulina on 2018-10-22 12:52:21 UTC

I use primitive cylinder shapes. The physic engine is ode and the caster wheel is part of the chassis.

Best

Asked by NRottmann on 2018-10-22 15:54:42 UTC

Answers

The problem have been the small inertia values of the wheels given by

 <inertial>
  <origin xyz="0 0 0" rpy="0 1.5707 1.5707"/>
  <mass value="0.5"/>
  <cylinder_inertia m="0.5" r="0.1075" h="0.03"/>
  <inertia
    ixx="0.00125" ixy="0.0" ixz="0.0"
    iyy="0.00125" iyz="0.0"
    izz="0.005"/>
</inertial>

This leads to an unstable simulation. A simple fix is to scale the mass by the factor 10 which leads to

  <inertial>
  <origin xyz="0 0 0" rpy="0 1.5707 1.5707"/>
  <mass value="5"/>
  <cylinder_inertia m="5" r="0.1075" h="0.03"/>
  <inertia
    ixx="0.0125" ixy="0.0" ixz="0.0"
    iyy="0.0125" iyz="0.0"
    izz="0.05"/>
</inertial>

and stabilizes the simulation. This is not really satisfying. Does anybody has an idea how to fix this problem without this trick?

Best

Asked by NRottmann on 2018-10-24 02:07:00 UTC

Comments