0:00

The punchline with the previous lecture was the POS, meaning position and

Â heading, is central in a lot of different situations. and we made the claim that,

Â other POS-based models, like cars or underwater gliders, or other kinds of

Â autonomous vehicles, can be made to look like a unicycle.

Â Today, I want to make this observation precise and concrete by looking at the

Â car-like robots. So, for instance, there's a picture of

Â our autonomous car out of Georgia Tech. And the question is,

Â how do we make this thing look like a unicycle? Well, the first thing we need

Â is a model. And the standard car kinematics is to add

Â another state to the system, which is the steering handle.

Â So here is the picture that we have in mind.

Â The, the rear wheel wheels are just pointing in whatever direction the car is

Â going which it or the car is facing, which is the orientation phi.

Â The position of the car, well, we're going to take this point which is in the

Â middle in between the front wheels. And this distance here is going to be l.

Â So, the rear wheels are l away from the front wheels.

Â And then, we have this angle which we're going to call psi.

Â So, what we're actually going to end up doing is moving the car in this

Â direction. And the direction then is psi+phi.

Â So, if we make this observation into a model,

Â we first see that the states are x, y, phi, and psi steering angle.

Â The inputs now that we're going to have are,

Â as before, the speed. How quickly is the car going? And, how

Â fast are we turning the steering wheel? I'm going to call this sigma.

Â Angular steering velocity, or steering angle velocity.

Â The model then becomes, well, x-dot and v-dot is as before v

Â cosin and then the direction we're going in.

Â But the direction we're going in is now psi+phi.

Â Then, we have an equation that relates the steering angle and the velocity to

Â the heading of the car. And then, the last component is that we

Â can immediately influence the velocity of the steering angle, so how quickly are we

Â turning the, the wheel. Okay, good.

Â Now, what we're going to do is pick sigma and v in a clever enough way to make this

Â thing become a unicycle. Well, let's start then with the unicycle

Â itself. So, this is our car model. Well, let's

Â start with our unicycle model and do something called curvature control.

Â So, what this means is that if I want to drive along a particular circular arc,

Â let's say that the radius of the arc is raw.

Â And here's the car, it's going, sorry, the unicycle it's going, do, do, do, do,

Â do, right? This is the direction in which it's going so the orientation in the

Â unicycle, this angle is just phi. Well, here's alpha and simple geometry

Â tells me that alpha is just phi minus pi over 2.

Â 3:24

But because alpha is phi minus pi over 2, I can write this is x dot plus rho sine

Â alpha, thanls to one of my favorite

Â trigonometric identities. Well, if I take the derivative of this

Â with respect to time, I get that, well, this thing the derivative of that is

Â zero. The time derivative of this,

Â phi dot is equal to omega. So, my x dot becomes omega rho cosine

Â phi. But, wait a second.

Â I know what x dot is, it's v cosine phi because it's a

Â unicycle. So now, these two expressions have to be

Â the same. Which means that the radius of the circle

Â is v over omega. Now, a lot of times, we care about what's

Â called curvature. And curvature is 1 over the radius.

Â So, the curvature is simply 1 over rho. Which means that the curvature I would

Â get if I have omega and v, well, it's omega over v.

Â So, the bigger the omega is, the tighter the circle, meaning the higher the

Â curvature. If omega is zero, I'm going at a, in a

Â straight line and the curvature is zero. So, this is the curvature of a unicycle.

Â Okay. Let's figure what the curvature is when we have a car.

Â The only difference now is that the you, the car is actually pointing in this

Â direction but it's going in this direction because of the fact we have a

Â steering angle. So, as before, alpha, this angle where we

Â wanted to say where the car is, is, well, it's phi plus psi minus pi over 2.

Â So, we're doing exactly what we did before.

Â x is x0 plus rho where rho is the radius of the circle,

Â sine phi plus psi. Taking the derivative, we get x dot is

Â rho phi plus psi cosine phi plus psi. Now, let's assume that we're driving on a

Â circle. This means that we're going to hold the

Â steering wheel fixed. Which means that this term is going to be

Â equal to zero because we're not changing the steering angel,

Â right? So, we know that psi dot is zero. Well, we also have the equation for phi

Â dot, it looks like v/l sine phi, sorry, psi, v/l sine psi.

Â And, we also know that x dot should be equal to this expression.

Â So, what do we do? Well, we simply now line up v here and

Â rho phi dot there to get the curvature. Sorry,

Â to get the radius of the circle. So, this becomes l divided by sine psi.

Â And now, we invert this to get the curvature.

Â So, the curvature becomes sine psi over l where psi is this fixed steering angle

Â we're driving. Okay.

Â Then, we have curvature for the unicycle, this thing.

Â Curvature for the car, that thing.

Â Well, we just put them equal, right? Why not? If we put them equal, then we

Â immediately get that sine psi should be equal to omega l/v.

Â So this is the steering angle we, if I have a unicycle that's driving at omega

Â and v, then this is what the steering angle should be to get the same behavior

Â out. Which also means that my psi then should be arcsin of, well, omega l/v.

Â Well, I can't set psi directly. So, what I need to do is say that this is

Â my desired steering angle. And then, I somehow need to make my

Â actual steering angle become close to my desired steering angle.

Â That's the name of the game here, right?

Â So when we get these arcsin, or arcsine sorry.

Â psi d is arc sinus of omega l/v. Okay.

Â Now, arcsin is a little bit of an annoying thing to have to do.

Â So instead, we're not going to do that. So, let's say that I have this thing and

Â I would like d to be close to it. Well, one thing I can do is a simple

Â P-Regulator, which is something you've seen.

Â But this thing involves this arcsin and one

Â thing to note is what happen if actually keep sinus in there while we would get

Â something kind of cleaner, right?

Â So, let's get rid of it and simply say that instead of psi here, I'm going to do

Â sine of psi. And instead of omega d then, I'm going to

Â do sine omega d. So, I keep saying omega, I mean psi, sin

Â psi d, which we know is omega l over v, which goes in there,

Â right? So, we keep the sinuses in there instead

Â of taking arcsin. And the reason for that is that for small

Â enough angles this is, this is roughly equal to the angle itself.

Â So, sinus is, is not a bad thing to do. well, let's see if this works.

Â So over on the left there, you see the unicycle, and over on the right you see

Â the car. And the unicycle has some omega and v,

Â and the car is running the sinus version of P-Regulator.

Â And, as you can see, they're pretty close, which means that we can basically

Â do the same kind of curvature control on the car as we can do on the unicycle.

Â So, the moral of the story with this is, you know what? We're planning.

Â We're getting some direction we want to move in.

Â Here is my direction I want to move in. Well, we know the clever trick. The

Â trick, right? The trick gives us v and omega, which is what are the speeds and

Â angular velocities we would like. We now also know that the curvature is

Â omega over v. So, if you give me v and omega, I can tell you what the curvature

Â is going to look like. Well, let's use this curvature idea to

Â make the car track the unicycle which gives us v and sigma.

Â And, of course, this v is the same as that v.

Â So, we don't have to do anything about it.

Â The only thing we have to do, is to add what sigma should actually be.

Â And this, ladies and gentlemen, allows us to make the car act like a unicycle

Â simply by using this curvature idea. And this generalizes to other types of

Â unicycle like systems where POS, again, is really important.

Â