0

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:

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.

path

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.

erik
  • 113
  • 1
  • 6
  • 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? – copper.hat Oct 08 '13 at 23:01
  • 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. – erik Oct 08 '13 at 23:11
  • 2
    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. – copper.hat Oct 08 '13 at 23:14
  • 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. – erik Oct 08 '13 at 23:16
  • 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. – copper.hat Oct 08 '13 at 23:20
  • Hmm, I can try that. I suppose to further elaborate on the question then...is there a way to use time for orienting myself (so that, say, I "know" that I've turned by the appropriate angle without overshooting)? – erik Oct 08 '13 at 23:27

1 Answers1

2

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.

DJohnM
  • 3,630
  • 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. – Ross Millikan Oct 09 '13 at 00:03
  • Yes; more accurate and perhaps more complicated to adjust the speed of both wheels Identical wheel diameter and no slippage would also be helpful. – DJohnM Oct 09 '13 at 00:15
  • 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}$? – erik Oct 09 '13 at 01:09
  • that is correct – Ross Millikan Oct 09 '13 at 03:42
  • Great, thanks! Worked like a charm! – erik Oct 10 '13 at 02:19
  • @espais: The equation at the end of my answer lets you pick the combination of added angular speed (limited by hardware?) and time of added speed (set by desired path?) to achieve a certain turn angle...And yes, you can split the half the added speed, left and right, positive and negative... – DJohnM Oct 10 '13 at 02:47