How to control velocity ratio when turning angle is θ?

Im designing a differential steering mechanism for my robot. Supposing my robot is going in a straight line and I want it to change it direction by a certain angle( $θ$ in the diagram). What should the velocity ratio be of the 2 wheels so that it gradually turns and starts moving along a line that is $θ$ degrees to the initial line of movement? If there's any ambiguity in the question please take a look at my earlier question which is similar. How to design a differential steering mechanism? • If I understand what you're asking the velocity ratio is the same as the travel distance ratio. Draw the turn circle and compare the circumferences... – Guy Sirton Jul 20 '13 at 17:24
• Are we talking about transitions from one straight line to another? The missing parameter is the distance over which you want to do that. So it's start a turn one way, and then go back to a straight line... – Guy Sirton Jul 20 '13 at 17:25
• Yeah that't it. Basically its the ratio of the distances traveled by the 2 wheels while turning. – Ghost Jul 20 '13 at 18:05
• If you were to describe your problem in terms of the diagram in my answer to Line Follower optimization, then it might be easier to see what you are actually having a problem with. – Mark Booth Jul 20 '13 at 18:43
• @Mark Booth Actually I already have taken a look at your answer. You'd referred it to me previously. I've adopted your formula $SL=rθ$ for my case but the problem only Im facing is that I dont have any way to get $r$, the radius of the turn. If I have that I can directly get the ratio of the 2 speeds. – Ghost Jul 20 '13 at 18:59

In your previous question, we calculated the velocity speed ratio that would be required to make a turn of a given radius. I'm going to reuse those formulas with inner and outer replacing left and right, and $d_{axle}$ replacing $A$.

In those terms, the ratio of the outer wheel's speed to the inner wheel's speed is still what it was before: $$\frac{v_{outer}}{v_{inner}} = \frac{r+d_{axle}}{r}$$

However, in this question, you're trying to determine how much time should pass with the wheels turning at those speeds (in other words, following a circular path of a given $r$) before you come to a desired turning angle of $\theta$.

Here is the distance equation from before:

$$d_{inner} = \frac{\theta*2\pi{r}}{360}$$ $$v_{inner} = \frac{d_{inner}}{t} = \frac{\theta*2\pi{r}}{360*t}$$

So, solving for $t$: $$t = \frac{\theta*2\pi{r}}{360*v_{inner}}$$

This is essentially saying "how long will it take me to travel along a circular arc defined by $r$ and $\theta$ if I move at the given speed $v_{inner}$".

Now for the bad news: achieving this is impossible in practice. The equations above are assuming that your acceleration is infinite, meaning that you would change your speed from $0$ to $v_{inner}$ instantly. This has never happened.

If you need to be sure that you've reached a desired heading, you'll need to start working with sensors. A GPS, a compass, or even wheel odometry would be good places to start.