In the last two videos we learned how to define
straight-line paths and then time scale them
to get trajectories.
If we want more flexibility to design the
shape of the path, as well as the speed with
which it is executed, we could specify a set
of configurations through which we would like
the robot to transit.
These configurations are called via points.
We also specify the times at which the robot
should achieve each of these via points.
We then solve for a smooth trajectory that
passes through the via points at the specified
times.
The choice of the via points and times allows
us to shape the path and trajectory.
In this case, we solve directly for a trajectory;
we do not first find a path and then time
scale it.
Let's consider motion in an n-dimensional
joint space.
For joint i, moving between via points j and
j-plus-one, we could define the motion as
a third-order polynomial of time.
We then apply four terminal constraints, the
initial and final position and the initial
and final velocity of joint i, to solve for
the four coefficients of the polynomial.
This is third-order polynomial interpolation
with specified via times and velocities.
This figure shows a path designed for a two-joint
robot using four via points: the start point,
the end point, and two other vias.
Each via point has the time that the robot
passes through the configuration as well as
the velocity at that time.
The velocity is indicated by the dashed arrows.
Each segment between via points, for each
degree of freedom, has four coefficients and
four terminal constraints, which allows us
to solve exactly for the trajectories between
via points.
The tangent of the path has to be aligned
with the specified velocity at each via point,
so we can use the velocities at the via points
to change the shape of the path.
These time plots show the position and velocity
of each joint during the trajectory.
You can see that the positions and velocities
are continuous at the via points, but the
acceleration is not.
Discontinuity in the acceleration may not
be desirable.
Also, it may be cumbersome to have to specify
the velocity at each via point.
Therefore, another solution is to leave the
velocities at the via points free, but to
constrain the velocity before and after a
via point, and the acceleration before and
after a via point, to be equal.
This is third-order polynomial interpolation
with specified via times only.
There are other ways to shape a path using
via points or control points.
In particular, with B-splines, the path does
not pass exactly through the control points,
but the path is guaranteed to remain in the
convex hull of the control points, unlike
the path you see here.
This property ensures that the path does not
violate joint limits.
