WEBVTT
00:00:00.450 --> 00:00:04.200
We want to discuss the case of
a wheel encoders in 2D, and in
00:00:04.520 --> 00:00:07.700
particular I want to discuss
the case of a robot equipped with
00:00:07.700 --> 00:00:12.280
a differential drive which is
very popular in mobile robotics.
00:00:12.730 --> 00:00:16.480
The robot moves in 2D, so the
state as we know is this vector,
00:00:16.480 --> 00:00:21.380
S = x, y and θ. The top view
00:00:21.380 --> 00:00:22.590
of the robot is like this.
00:00:26.220 --> 00:00:29.110
This is the left wheel, this
is the right wheel, the distance
00:00:29.080 --> 00:00:33.450
between the wheels is known
and also the radius of the wheel
00:00:33.370 --> 00:00:37.630
are known and they are R(L) and
00:00:37.660 --> 00:00:41.520
R(R). The robot
moves in this direction.
00:00:41.970 --> 00:00:45.580
For instance, if the two
wheels move with the same speed, the
00:00:45.570 --> 00:00:48.340
robot accomplishes a straight
trajectory, if they move at the
00:00:48.340 --> 00:00:51.500
same speed but with opposite
direction, the robot accomplishes
00:00:51.430 --> 00:00:56.340
a poor rotation and by
suitably powering the two wheels,
00:00:58.620 --> 00:01:03.250
we can accomplish any motion in 2D.
00:01:03.430 --> 00:01:08.020
Now, the wheel encoders
provide the rotation of each wheel at
00:01:07.900 --> 00:01:12.810
each time step. For
instance, time step
00:01:12.810 --> 00:01:16.960
Ti, Ti+1. The two
rotations will be αRi+1
00:01:20.820 --> 00:01:24.430
and αLi+1 and so they can be
00:01:26.470 --> 00:01:29.170
set in a vector, Ui+1 equals αRi+1
00:01:32.960 --> 00:01:37.650
and αLi+1. Now the two
robot configurations,
00:01:38.260 --> 00:01:43.140
these two steps are
obviously Si+1, the position and
00:01:43.140 --> 00:01:47.370
orientation the time steps i+1
and Si the position and orientation
00:01:47.360 --> 00:01:49.190
to time steps i.
00:01:49.350 --> 00:01:53.630
What we want to obtain, as in
the one case we saw in the previous
00:01:53.590 --> 00:01:58.280
sequence, is to find the
function f that is the function that
00:01:58.280 --> 00:02:00.370
provides us this link.
00:02:00.860 --> 00:02:05.520
So, the function will
have three components
00:02:05.630 --> 00:02:10.580
because Si+1 has three
components and it depends on these three
00:02:10.570 --> 00:02:13.860
components here, this step and
the previous time step and the
00:02:13.780 --> 00:02:16.110
two values here in the vectorial.
00:02:18.260 --> 00:02:21.990
This is the position of the
robot at the time step i and then
00:02:21.910 --> 00:02:26.540
it is possible to see that both the
wheel moves along the circumference
00:02:26.690 --> 00:02:30.920
and this is an
approximation for a small time step
00:02:32.040 --> 00:02:35.750
and this is the position of
the robot, so the left wheel and
00:02:35.730 --> 00:02:37.850
the right wheel at the time step i+1.
00:02:39.430 --> 00:02:44.010
We call the angle here δθ, this
is the initial robot orientation
00:02:44.880 --> 00:02:48.510
and it is possible to see that
the final robot orientation differs
00:02:49.050 --> 00:02:51.980
from the initial one
by the same angle here.
00:02:52.190 --> 00:02:55.280
It is possible to see that this
angle here is exactly the same
00:02:55.190 --> 00:03:00.190
than this angle here,
00:03:00.000 --> 00:03:00.200
δθ.
00:03:00.580 --> 00:03:02.110
Now, the two circumferences,
the two arcs of the circumference
00:03:02.850 --> 00:03:06.410
share the same origin here but
we don't know the distance here,
00:03:07.370 --> 00:03:12.200
so the distance between these points O
and L and we will call this quantity X.
00:03:13.530 --> 00:03:17.230
We have these two
equations, X times δθ equals
00:03:18.150 --> 00:03:22.910
to the shift of the
left wheel and we call
00:03:23.400 --> 00:03:27.900
this SL, and the same for
the right wheel, we have X+B
00:03:31.080 --> 00:03:33.660
times the same angle δθ equals to SR.
00:03:35.470 --> 00:03:39.560
From these two equations, it is
possible to obtain δθ, we eliminate
00:03:39.600 --> 00:03:43.030
X by using the first equation
in the second one and we obtain
00:03:42.980 --> 00:03:47.380
δθ equals to the
difference of the two shifts
00:03:47.560 --> 00:03:52.560
divided by B. Regarding
the shift of the robot, this
00:03:53.100 --> 00:03:57.390
will be this quantity here
which is the mean value between the
00:03:57.390 --> 00:03:59.400
shift of the left
wheel and the right wheel.
00:03:59.800 --> 00:04:04.450
We have the shift δρ, we call
this δρ so this distance here
00:04:08.010 --> 00:04:09.060
is this: SR+SL/2.
00:04:09.850 --> 00:04:14.830
Now, these two shifts
are directly provided by
00:04:15.890 --> 00:04:20.160
the wheel encoders and
in fact they are SR =
00:04:21.320 --> 00:04:25.700
2, the radius of the
right wheel times the
00:04:25.760 --> 00:04:29.600
rotation, and if you want
this is at the time step i+1
00:04:30.960 --> 00:04:35.180
and SL the same. So, now
starting from these two
00:04:35.180 --> 00:04:40.140
quantities,δθ and δρ, we want to
00:04:40.140 --> 00:04:41.870
compute the new robot configuration.
00:04:43.940 --> 00:04:47.190
These are two consecutive
robot configurations, these are the
00:04:48.470 --> 00:04:52.310
measurements provided by the
wheel encoders and these are the
00:04:52.310 --> 00:04:57.070
shifts of the right and the left
wheel according to these measurements
00:04:57.370 --> 00:05:01.370
and these are the
shifts, δρ and the rotation δθ
00:05:02.070 --> 00:05:05.580
in terms of the shift of the
right and left wheels that we just
00:05:05.560 --> 00:05:06.070
derived previously.
00:05:07.590 --> 00:05:12.200
This is our initial
configuration, this quantity is
00:05:12.460 --> 00:05:15.730
xi and this yi
00:05:17.350 --> 00:05:19.340
and this angle here is θi.
00:05:19.750 --> 00:05:24.740
Now, we remark an important fact
that is that the two operations
00:05:25.500 --> 00:05:29.050
of a shift and a rotation are
not commutative, for instance,
00:05:29.090 --> 00:05:33.610
if we first shift and
then rotate, the final
00:05:33.610 --> 00:05:37.180
configuration will be the
position here and the orientation
00:05:37.100 --> 00:05:41.630
will be this, if this is a change of
00:05:41.630 --> 00:05:46.010
orientation. On the contrary,
if we first rotate and then we
00:05:46.010 --> 00:05:48.320
shift, we move like here.
00:05:49.510 --> 00:05:52.780
The final orientation
is obviously the same
00:05:54.250 --> 00:05:56.270
but the final position, no.
00:05:56.850 --> 00:06:00.910
What is done is that since
this data are delivered at a very
00:06:00.910 --> 00:06:05.780
high frequency, the two
configurations are approximated to
00:06:05.950 --> 00:06:09.480
be the same and it is a good
approximation, I repeat, because
00:06:09.440 --> 00:06:12.380
this interval of time is very small.
00:06:12.840 --> 00:06:16.420
It is common to assume that the
robot first shifts then rotates,
00:06:16.860 --> 00:06:21.070
so the final position will
be this quantity δρ, this
00:06:22.320 --> 00:06:22.730
is xi+1
00:06:27.310 --> 00:06:31.950
and this is yi+1 and the final
00:06:31.950 --> 00:06:36.910
orientation will be
this, where this is a δθ.
00:06:37.060 --> 00:06:41.640
This position is easily
obtained in this way, xi+1
00:06:42.340 --> 00:06:46.700
is equal to xi that is this plus δρ
00:06:47.150 --> 00:06:51.390
times this angle here
that is cosθi, the same
00:06:52.780 --> 00:06:57.730
for y and finally for the
orientation we easily have θi+1
00:06:57.730 --> 00:06:58.400
equals θi+δθ.
00:07:04.820 --> 00:07:09.200
This is exactly what we were
looking for because this is the
00:07:09.200 --> 00:07:13.970
final configuration, Si+1 in
terms of the previous configuration
00:07:13.670 --> 00:07:17.990
Si, which appears here,
00:07:18.290 --> 00:07:23.220
here and here, and also in
terms of the two measurements
00:07:23.390 --> 00:07:27.270
from the wheel encoders
because they are inside δρ and δθ
00:07:28.220 --> 00:07:30.550
through this
equation and this equation.
00:07:31.210 --> 00:07:35.460
If we want, this is a special case
again of proprioceptive measurements
00:07:35.690 --> 00:07:40.310
which is given, as I said,
by the equation Si+1 equals a
00:07:40.310 --> 00:07:44.520
function of Si and the Ui+1.