Gazebo | Ignition | Community
Ask Your Question

Differential drive stutters by driving a circle

asked 2018-10-22 10:19:09 -0500

NRottmann gravatar image


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:

Hope someone has an idea.


edit retag flag offensive close merge delete


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?

chapulina gravatar imagechapulina ( 2018-10-22 12:52:21 -0500 )edit

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

NRottmann gravatar imageNRottmann ( 2018-10-22 15:54:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-24 02:07:00 -0500

NRottmann gravatar image

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

  <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"/>
    ixx="0.00125" ixy="0.0" ixz="0.0"
    iyy="0.00125" iyz="0.0"

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

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

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


edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-10-22 10:19:09 -0500

Seen: 334 times

Last updated: Oct 24 '18