LESSON

# Describing rotation and translation in 3D

#### Transcript

So, as we should well know by now, pose has got 2 components; a translational component and a rotational component. And there are several ways that we can represent a pose. We could represent the translational component as a vector, and then we could represent the rotational component by a set of 3 Euler angles. Alternatively, we could represent it by a vector plus a set of 3 roll, pitch, yaw angles. Or we could represent it as a vector plus a quaternion. The fourth option is to represent it as a homogeneous transformation and this is what we did for the 2-dimensional case. As we've done several times already in this lecture we've lifted concepts from 2-dimensions in to 3-dimensions and that's what we're going to do next. We are going to work out how we describe pose as a homogeneous transformation in 3-dimensions.

Consider two 3-dimensional coordinate frames and a point P. Now, I'm going to introduce a frame {V}. It has the same origin as coordinate frame B but its axes are parallel to coordinate frame A. I can describe the point P with respect to the coordinate frame {V} by using a rotation, rotation from coordinate frame {V} to coordinate frame B. I can describe the origin of frame {V} by a vector with respect to frame A and I can describe the point P in terms of a vector with respect to coordinate frame A. I can write a simple vector relationship. I can add these 2 vectors because coordinate frame {V} has its axes parallel to those of coordinate frame A.

Now, I can substitute the first relationship and I have now an expression for a point with respect to frame A in terms of a vector with respect to the original coordinate frame B and I can substitute A for {V} because the axis of frames {V} and A are parallel to each other.

I can substitute in the elements of the rotation matrix and expand the vectors in terms of their elements and then, I can augment the vector by appending a 1 to it and move the translation between the origins of the coordinate frames into the matrix. And to keep things tidy, I'm going to augment the other vector as well which means I have to pack the matrix out with some zeroes and ones. So, what we have now is a homogeneous representation. We have a homogeneous transformation matrix and two homogeneous vectors. We can write it in compact form like this with the note that the homogeneous vectors by putting a tilde above them. We can see that this matrix comprises a rotation component, a translational component, 3 zeroes and a one.

So, this single 4 x 4 matrix encapsulates rotation and translation and allows us to transform a vector describing a point from coordinate frame B to coordinate frame A. This 4 x 4 matrix here, we refer to as a homogeneous transformation and these 2 vectors here are homogeneous vectors. And just a reminder on homogeneous vectors, we denote them by tilde on top. We take the Cartesian vector, in this case because it's 3-dimensional space, it's got 3 elements A, B and C. The homogeneous version of that has got 4 elements A, B, C and 1. We append a 1 to it. Here it is in a very compact form. We have a point denoted by a homogeneous vector with respect to frame B and we can transform it to a point described by a homogeneous vector with respect to frame A. Relative pose is described by single 4 x 4 matrix. A mathematician would say that this matrix belongs to the special Euclidean group of dimension 3 and the short hand is that T is an element of the set SE(3); 3 indicating the dimension in this case 3.

Instead of the abstract symbol ksi, we can use a homogeneous transformation matrix, a 4 x 4 matrix. Compounding or composition is simply a matrix-matrix product. To compound 2 poses, I simply multiply their representation in terms of homogeneous transformations. Note well that the inverse of a homogeneous transformation is not equal to its transpose, that property only belongs to the rotational component of a matrix which is an orthogonal matrix. The homogeneous transformation matrix is not an orthogonal matrix. It's inverse is not equal to its transpose. Finally, vector transformation is simply a matrix-vector product.

#### Code

There is no code in this lesson.

We learn how to describe the 3D pose of an object by a 4×4 homogeneous transformation matrix which has a special structure.

### 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. Sachin Nath says:

Sir how to represent both translational and rotational part of a 3D frame in matlab?

1. Peter Corke says:

This is the whole topic of this lesson. Please ask a more specific question.

2. Amer says:

i made the following function, I give it two parameter the first rotational matrix and the second transitional Column vector, and the function return the homogenous transformation matrix.

function [ RT ] = rvc_homogeneous_trunsformation( R, T )
% homogeneous
RT = [R T; 0 0 0 1];

end

1. Peter Corke says:

That looks good, notation wise, maybe use lower case t, upper case T is “reserved” for homogeneous transforms.

3. Amer says:

or by simply multiply the translation vector [transl(x, y, z)] and the rotation matrix.
see the sec 2.2.2.1 page 46 in the second edition of the book.