LESSON

# Summary of paths and trajectories

#### Share

#### Transcript

Let’s summarize some of the main ideas that we have learned in this lecture. There is an important distinction between a path and a trajectory. A path is a spatial construct and tells us how we get from A to B through the world. A trajectory is a path plus a schedule. It tells us how quickly we should move along the path, at what time we should be at what point along the path. It’s important with trajectories that the position and orientation vary smoothly with time. We do this for a number of reasons. We want to reduce the maximum acceleration on the robot, allows us to reduce the size of the motors, and it perhaps reduces vibrations induced in the structure of the robot. What the smooth mean would mean that the position is continuous as a function of time and velocity is continuous as a function of time. And, we would hope that the acceleration is continuous and perhaps the jerk is continuous and so on up through higher-order derivatives.

In robotics, a common technique for generating a trajectory is to use a polynomial, typically, a quintic polynomial which has got six coefficients which lets us independently specify six boundary conditions, the initial and final position, initial and final velocity, initial and final acceleration. And, we can write this simple matrix relationship which gives us the coefficient values as a function of the trajectory time, capital T, and the boundary conditions. There is, however, a performance problem with polynomial trajectories and that is that the peak velocity is almost twice the average velocity and we’re wasting motor performance and effectively taking twice as long to get where we want to get to.

A more efficient trajectory is what’s called the trapezoidal profile where we have some acceleration phase followed by a coasting or constant velocity phase, followed by a deceleration phase. A slight disadvantage of the trapezoidal profile is that the second derivative, the acceleration is discontinuous, but it has many, many other virtues and very, very commonly used in robotics and machine tool control. If we want to move from one point to another through a few intermediate points which we call via points or way points, then in order to achieve continuity in the path, we need to introduce what are called blends and they are shown here in red. We introduce an acceleration period to transition from the velocity heading towards, for instance, point 2 in to the velocity we need to head towards point 3. The disadvantage being we never actually get to the point that we’re heading for.

If the acceleration time is small, we get very close to the via points, but the acceleration on the machine is high. Acceleration time is large, then the acceleration of the robot is low, but we miss the via points by a larger amount. We introduced the notion of interpolating between an initial value and a final value based on a scalar S which varies between 0 and 1. 0 gives us the initial value, 1 gives us the final value, and 0.5 is halfway in between. X can be a vector. And, if S is a smooth function of time, then so is X.

We talked about how we cannot apply this simple interpolation scheme to rotation matrices. Rotation matrices are special. They are orthogonal matrices. So, adding two of them together does not result in another orthogonal matrix. So, we don’t do this to rotation matrices. Instead, what we can do is convert our rotation to a set of angles. It could be Euler angles, it could be roll, pitch, yaw angles, and we can interpolate those. We introduced the direction problem. When we’re interpolating an angle from an initial value to a final value, it’s important to remember that there are two ways we can travel around the circle. We can travel the long way which is shown here in blue, or the short way which is shown here in red through the value of Theta equals pi. We can interpolate quaternions. We need a more complex formula in which to do this. Interpolation, once again, is a function of S and S varies from 0 to 1. And, an important parameter in this interpolation is Theta which is determined from the parameters of the initial and final quaternion. Quaternion interpolation provides the shortest and most direct path between two orientations.

This figure shows the position of the tip of a vector which is undergoing different types of rotational interpolation. The white path is due to quaternion interpolation and, as just mentioned, it’s the shortest and most direct path. We can see that the Euler angle and roll, pitch, yaw angle interpolation paths deviate from that. That means that they take a longer and more indirect path between the two orientations. Finally, we come to pose interpolation, often referred to as Cartesian interpolation. We have two poses, pose 0 and pose 1, which each represented by a rotation matrix and a translation vector. We can convert the rotation matrix to a quaternion. Interpolating the translation is very simple. We apply linear interpolation to the translational component, and then we apply quaternion interpolation to the rotation component. We can convert the interpolated quaternion back to a rotation matrix, combine it with the interpolated translation to rebuild a homogeneous transformation if that’s what we want.

We summarise the important points from this lecture.

### Skill level

Undergraduate mathematics

This content assumes high school level mathematics and requires an understanding of undergraduate-level mathematics; for example, linear algebra - matrices, vectors, complex numbers, vector calculus and MATLAB programming.

### Rate this lesson

## Discussion

## Leave a comment

Please Sign In to leave a comment.

Thank you , how to find the minimum time of trajectory in cartesian space …given the maximum (linear&angulaire) velocity and (linear&angulaire) acceleration of robot….especialy in orientation!!! how to extract time t from orientation expression!?

thank very much for you vedios …are very clair.

The general approach would be to consider translation and rotation separately, and for the desired motion and motion limits, what the time is for the translation and rotation separately. The largest time sets the time of the motion, and the faster possible motion would be slowed down. Does this help?

The lessons are well explained by the Professor Peter Corke to understand a lot about Paths and Trajectories. Thanks!

YOU ARE SIMPLY AMAZING!

I think about your courses all day long!!!! I’ve never had this energy before; thanks professor!