0:00

In the last lecture, we saw that one way of overcoming this inherent or seeming

Â tension between x.+u was a way of generating, references,

Â and the actual robot dynamics was to introduce a layered architecture,

Â where you had a planner that planned reference directories, and a tracker that

Â tracked these reference directories. What I want to do today, in today's

Â lecture is, see how do we make, this, architecture concrete for the particular

Â example of a differential drive wheeled mobile robot.

Â And if you recall, going back in time to module 2,

Â a differential drive mobile robot has 2 wheels,

Â and the wheel velocities can be independently controlled.

Â So we have v sub l for the left wheel, and v sub r for the right wheel.

Â And if, this robot is located at x,y and in this

Â case it's heading straight up. So this is the angel Phi then we saw that

Â the dynamic for the differential drive mobile robot was given by this

Â expression. We also quickly realize that there was

Â something. Rather unintuitive about this.

Â It's hard to feel real velocities. It's much easier to feel what' happening

Â if you're, assuming that you can control the speed of the robot directly and the

Â angler velocity meaning how quickly you're turning.

Â If you're doing that you instead get a unicycle model.

Â The differencial drive mobile robot, dynamics is not the unicycle dynamics but

Â it's close, and infact module 2 part of the the things we did in that module was

Â connection these 2 and we actually derived, derived this expression where

Â the right and the left wheel volocities could be related to VE anomia directly

Â meaning, the control signals we produce under the unicycle assumption can be

Â directly mapped onto v sub r and v sub l. And that's nice.

Â Because v and [INAUDIBLE] are intuitively clear about v sub r and v sub l are not.

Â So, the way we think about differential drive mobile robots is really in terms of

Â unicycles. And then, we make this final

Â transformation onto the actual real velocities before resending the, the com

Â the actuation commands. So that's the model we have to deal with.

Â Well, if we now buy that we can use unicycles then, we really have already

Â seen how to make the unicycle go in a desired direction.

Â So here is the unicycle model again. Well I would like it to go in the

Â direction phi sub d or phi desired. Well, we actually saw early on that, why

Â not use a PID regulator? Well, if I let the error Between the desired angle and

Â the actual angle, be given by E, and in particular, if you don't do E but you use

Â arc tan 2 of sine phi [UNKNOWN] minus phi comma Cosine, the same thing.

Â Then you get something that's between -pi and pi,

Â then you don't have to worry about the angles being, poorly behaved.

Â Well, if you use a PID regulator. Then we've seen that this actually allows

Â us to track this, reference direction, theta or phi sub d, rather elegantly.

Â And, as a recap, this is what the PID

Â regulator looks like. It looks rather hairy, but, we also saw

Â how to implement it in a rather direct way.

Â So we know, already, how to track angles. Well, all we need to do then is add in

Â the speed component. So, let's assume that the low level

Â planner has given us a desired velocity, u, where we have assumed then, that x

Â does equal to u. Well, we have, actually, the unicycle,

Â right? And now, this vector, is actually the desired direction and magnitude, we

Â want to move in, and, why not simply set that equal to u? U is the desired

Â velocity. Well, if we do that, then we can start

Â seeing, okay, how do we get, desired headings out, and what should our

Â velocity be? Well, it's very simple. If we simply take arc tangents of u2 over

Â u1, where u2 is the y component of u, and u1 is the x component, then that is the

Â angle. So phi desired, we get for free.

Â All that remains to be designed, then, is the velocity component, but hey check

Â this out. If I take the unicycle model and I take X

Â dot squared plus Y dot squared and then I take the square root of this, I get This

Â square root here. Well, that is the square root of v^2

Â cosine squared phi plus sin^2 phi. Well, this is one of the well-known

Â trigonometric identities. This is exactly equal to 1, so all I get

Â is square root of v ^ 2. Which is v itself.

Â So what I noticed is that, if I'm moving the unicycle around.

Â The magnitude of this vector in the direction I'm going with.

Â Well, that's v. Well, but I know what the magnitude is of

Â the u vector. It's just the absolute value, or the, the

Â norm of u. So what this simply means, is.

Â You know what? V should be equal to the norm of u.

Â Well, the norm of u is the square root of v1^2+u2^2.

Â So, I immediately know, not only which direction I would like to go in but how

Â quickly I should go in that direction. So, the way to build a tracker for the

Â unicycle robot is simply to take arc tangents of u2 over u1 as the desired

Â heading, and then let omega be equal to PID of e, where e is phi desired minus

Â phi, and v be the magnitude of the u vector itself.

Â That's good news, because this gives us all we need.

Â Before, as before, we plan using our navigation algorithm.

Â Out of the navigation algorithm comes u1 and u2, the direction in which we would

Â like to move. Well, at the end of the day, the tracker

Â needs to spit out V sub R and V sub L, which is derived from the left wheel

Â velocities for the differential drive mobile robot, and now we know what to put

Â inside a tracker block. If I desire, the desired heading is the

Â arc tangents of U2 over U1 Then we use a PID regulator, for instance, or some

Â other regulator, for regulating the angle.

Â So omega = PID of phi desired - phi. The velocity is simply the magnitude of

Â the u vector, which we know how to compute now.

Â So, this gives us omega and v for the unicycle.

Â And then we take this and map it onto the left and right wheel velocities of the

Â actual robot. So this means that we can actually

Â successfully use this layered arcitecture for our differential drive mobile robots,

Â and this is the way we did it in the experiments that we saw In the previous

Â module. Now, for the unicycle.

Â There is an even more clever trick that is not involving layered architecture,

Â but it's letting the unicycle really Act like x dot = u.

Â And in the next lecture, we will not use this PID based tracker, but this clever

Â trick as a way of being eeven more elegant when handling differential drive

Â mobile robots.

Â