Given a robot with 2 wheels with radius r on one axle with length D, I want to set the wheel speed so that it turns to an angle phi as fast as possible. The timestep t is 64 milliseconds.

I thought the wheel speed could be set to v = ((desired_heading-actual_heading) * circumference_wheel_trajectory)/(2*pi * t * wheel_radius). This will converge to a somewhat right angle, eventually, but its very slow and becomes slower as I approach the angle I want to be at.

Is there an alternative/better way to do this?

  • $\begingroup$ As mentioned in the question I've closed this as a duplicate of, you may also want to have a read through my answer to Line Follower optimization. $\endgroup$ – Mark Booth Dec 8 '13 at 18:35
  • $\begingroup$ Also, bear in mind that for maximum turning speed, you may find that it is quicker to turn on the spot, i.e. drive one wheel half the amount in one direction and the other wheel half the amount needed in the other direction. $\endgroup$ – Mark Booth Dec 8 '13 at 18:37