LESSON

# Paths and trajectories

#### Transcript

We all have a pretty intuitive idea of what a path is. We consider it as a way of getting from place A to place B. We can consider it as a set of points that link A to B; a set of small steps that we take along the way. A path is a spatial construct. It says something about how we get from A to B through the world but it doesn't say anything about how quickly we should move along it. There's no notion of time. A trajectory on the other hand comprises a path and a schedule for getting from A to B. So there is a notion of time or speed along the path. It's a set of points that I need to be at by a particular time. In my MATLAB work space, I have got two poses represented as 4x4 homogeneous transformation matrices. The first pose represented by the workspace variable T0, has got no rotation and has its origin at the origin of the world coordinate frame.

The second post represented by the work space variable T1, comprises set of 1 in the x direction 2 in the y direction and 3 in the z direction and an orientation described by roll pitch yaw angles 0.6, 0.8 and 1.4 radians respectively. And we can visualize each of these poses. I can plot the pose T0 and we can see there its origin is at the origin of the world frame. And its axes are aligned with the world frame. I can plot the other pose T1 and we can see that its origin is not at the origin of the world reference frame and its axes are not parallel to the reference axes. Now I can animate the motion that goes from pose T0 to pose T1 and we can see our coordinate frame is translating and rotating in order to move from pose T0 to pose T1. So this is what I mean when I talked about a trajectory which is smooth motion from one pose to the next. Figuring out how to do this is the subject of this lecture.

#### Code

There is no code in this lesson.

Time varying coordinate frames are required to describe how the end-effector of a robot should move to grab an object, or to describe objects that are moving in the world. We make an important distinction between a path and a trajectory.

### Professor Peter Corke

Professor of Robotic Vision at QUT and Director of the Australian Centre for Robotic Vision (ACRV). Peter is also a Fellow of the IEEE, a senior Fellow of the Higher Education Academy, and on the editorial board of several robotics research journals.

### Skill level

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.

Average

## Discussion

1. Shounak says:

Hello,
I am getting different results for T1 in Matlab using the rpy2tr and transl functions. Is their a difference between the robotics toolbox versions?

1. Peter Corke says:

As per your previous question, there are subtle differences between v9 of the toolbox used for this video, and v10. There are some different defaults. The value I get using v10 is
>> transl(1,2,3)*rpy2tr(0.6, 0.8, 1.4) ans = 0.1184 -0.7445 0.6571 1.0000 0.6866 0.5394 0.4875 2.0000 -0.7174 0.3934 0.5750 3.0000 0 0 0 1.0000

1. Shounak says:

Hello Sir,

Using v10 version I am getting

>> transl(1,2,3)* rpy2tr(0.6, 0.8, 1.4)

ans =

0.9996 -0.0243 0.0142 1.0000
0.0244 0.9997 -0.0101 2.0000
-0.0140 0.0105 0.9998 3.0000
0 0 0 1.0000

2. Shounak says:

Converting to degrees I get your result. But why are my defaults in degrees even though I am using the same v10 version?

>> transl(1,2,3) * rpy2tr( 0.6*180/pi, 0.8*180/pi, 1.4*180/pi )

ans =

0.1184 -0.7445 0.6571 1.0000
0.6866 0.5394 0.4875 2.0000
-0.7174 0.3934 0.5750 3.0000
0 0 0 1.0000

1. Peter Corke says:

There might be a problem with your installation. Type
>> which rotx
if the result includes the string “phased” then you have a clash between the Phased Array Toolbox and my Toolbox. If this is the case use pathtool to move my toolbox to the top of the path, or if you are not intending to design antennas, remove the phase array toolbox.

2. Peter Corke says:

Unfortunately there is. The videos were made with v9.x of the Toolbox, the most recent version is v10.x. The manual for v10, the file robot.pdf, outlines the differences between v9 and v10. There is no great disadvantage to working with v9.

2. brown says:

hello sir and thank you very much for ur work , i’m glad to be one of many users of your books and toolbox apps , i ‘m kind of new here but i would like to ask you about this particular course it doesn’t work with me when i put
transl(1,2,3)* rpy2tr(0.6, 0.8, 1.4) and it shows a result on matlab said “Inner matrix dimensions must agree.””” and mathematicly it’s true we can’t multiply (4*4 matrix with 3*3 matrix ) and thank you again .

1. Peter Corke says:

Perhaps there is something wrong with your installation, this should work. Can you post the question, with screen shots, at http://tiny.cc/rvcforum and we can get it resolved.