I am working on a simulation of a two-wheeled robot, and at present am driving it by setting each individual wheel's velocity. The robot is similar to an ePuck:


What I would like to do is set an initial (and constant) overall speed for the robot, and simply command it to turn by a specified angle while moving. At this point, I'd like to keep the model simple and not worry as much about acceleration.

Essentially, what I would like to do is command it to turn by 90 degrees, as shown in the next picture. On that basis, with a constant speed on the forward motion of the body itself, what I'd like to know is how to calculate the appropriate velocity of each wheel separately.


I'd looked into some existing models that go into differential equations here and here, however I wasn't able to understand if it were possible to find the values that I'm interested in.

  • $\begingroup$ How can the body have constant velocity and turn? Did you mean constant speed? Are you just trying to turn, or are you trying to follow some path? $\endgroup$ – copper.hat Oct 8 '13 at 23:01
  • $\begingroup$ Perhaps I meant constant speed. Essentially I want the robot to overall move at a constant pace and reorient itself to its new direction as it is moving. Worst case I could stop it and spin it, but I'd rather avoid that. $\endgroup$ – the_e Oct 8 '13 at 23:11
  • 2
    $\begingroup$ If the exact path is not crucial, just speed up the outer wheel by some amount and slow the inner wheel by the same amount. $\endgroup$ – copper.hat Oct 8 '13 at 23:14
  • $\begingroup$ Exact path isn't crucial, but I would like to turn this into a simple function that would take an angle as a parameter and set the wheel velocities appropriately. I may need it to turn to any angle between 0 and 360 deg as it is moving. $\endgroup$ – the_e Oct 8 '13 at 23:16
  • $\begingroup$ Do what I said above, then the device will yaw at an easily computed rate, so by controlling the time you can turn to whatever angle you want. $\endgroup$ – copper.hat Oct 8 '13 at 23:20

Let $W$ be the distance between the points of contact of the two wheels. If you want to turn the (really neat) vehicle through an angle of $\theta \text{ }$radians, then the outer wheel must travel a distance $W\cdot \theta \text{ }$farther than the inner wheel.

If the radius of each wheel is $R$, then the outer wheel must rotate on its axle through an "extra" angle (relative to the inner wheel) given by, in radians:$$ \theta_{extra}=\frac{W\cdot \theta}{R}$$If you want to work in angular velocity and time, assume that you can add an angular velocity $\omega_{add}$, in radians per second to the outer wheel for T seconds. Then to turn through an angle $\theta$ $$T=\frac{W\cdot \theta}{R\cdot \omega_{add}}$$ If you can "add" positive or negative angular velocity, you could change the speed of just one wheel, say the left one; add speed to turn right, and reduce speed to turn left.

  • $\begingroup$ To maintain the speed of the center of the puck, the outer wheel should speed up by half that and the inner slow down by half that. $\endgroup$ – Ross Millikan Oct 9 '13 at 0:03
  • $\begingroup$ Yes; more accurate and perhaps more complicated to adjust the speed of both wheels Identical wheel diameter and no slippage would also be helpful. $\endgroup$ – DJohnM Oct 9 '13 at 0:15
  • $\begingroup$ So if I understand correctly, the angular velocity updates to each wheel can be found by solving for $\omega_{add}$? And, according to @RossMillikan, the outside wheel is +0.5*$\omega_{add}$ and the inner would be -0.5*$\omega_{add}$? $\endgroup$ – the_e Oct 9 '13 at 1:09
  • $\begingroup$ that is correct $\endgroup$ – Ross Millikan Oct 9 '13 at 3:42
  • $\begingroup$ Great, thanks! Worked like a charm! $\endgroup$ – the_e Oct 10 '13 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.