LESSON

# Summary of 2D geometry and pose

#### Share

#### Transcript

Let's summarise some of the big ideas from this lecture. The first thing that I want to say, and I can't say this strongly enough, is the coordinate frames are your friend. They make it very easy to decompose and understand complex problems. So we assign coordinate frames to everything in the robot's environment and write down the relationships between the coordinate frames through rigorous approach and will ultimately save you a lot of time. Don't be afraid to use lots of coordinate frames.

Coordinate frames follow the right-handed convention, the X axis and the Y axis are related like this. If we have 2 coordinate frames the relative rotation between them is defined like this, angle increases positively in the anti-clockwise direction. Points can be represented as vectors with respect to particular coordinate frames and in our notation we denote a vector by lower case p, and the preceding label indicates the frame that the vector is with respect to, and the trailing label indicates the destination of that vector. So in this case the A denotes the fact that the vector starts at the origin of frame A and it goes to the point B.

We can describe the relationship between two coordinate frames in terms of pose. And pose is something that has got three parameters: it's got a translation, the X and Y component and the rotation which is the theta component. We can consider it as a simple motion, a translation and a rotation. Graphically we denote pose by a thick vector with a triangular head. Symbolically we represent it by the Greek letter ksi. The left-hand label indicates the frame of reference and the right-hand label indicates the destination pose. So in this case there's a saying this is the relative pose from coordinate frame A to coordinate frame B.

We can describe a point in terms of vectors with respect to different coordinate frames. In this case the point D, we can describe with a vector in coordinate frame C attached to the car or coordinate frame W which is fixed within the world. We can transform a vector from one coordinate frame to another by applying the dot operator and the pose, which describes the relationship between the two coordinate frames. We can't simply add vectors and poses because they are different mathematical objects.

We can combine poses. So if we know the pose from frame A to frame B and the pose from frame B to frame C then we use the O+ operator to compose them into the relative pose from frame A to frame C, and we can extend this approach indefinitely. This process is sometimes called compounding or composition.

We can rewrite a complex set of spatial relationships defined in terms of coordinate frames, in terms of a bit tidier, a pose graph. And we can use the pose graph to write spatial relationships that describe relative poses in terms of other relative poses.

We introduced a spatial algebra. The important things is to note are that we can compose or compound two relative poses using the O+ operator. The O+ operator is not commutative so ksi 1 O+ ksi 2 is not equal to ksi 2 O+ ksi 1.

We have a concept of a no pose that's a zero relative motion. If we add it or we subtract it from a pose it makes no difference, the original pose is unchanged. And we introduced a negation operator, the O- symbol, and that is equivalent to the inverse motion of X ksi Y, the motion from frame X to frame Y, the negation of that is motion from frame Y to frame X.

And we also introduced the dot operator which transforms a vector from one coordinate frame to another.

These are all very abstract concepts. We've introduced a lot of symbols, we've introduced ksi to represents a pose, O+, O- and the dot.

The next step is to turn this into real mathematical objects and we can describe rotation in terms a 2 x 2 matrix that transforms a vector from one coordinate frame to another coordinate frame if the origins of those two frames are identical. The 2 x 2 rotation matrix is an orthogonal or orthonormal matrix, its inverse is the same as its transpose and is determinant and is always +1. We say that such matrices belong to the special orthogonal group of dimension 2. The matrix transforms a vector from coordinate frame B to coordinate frame A, but it is defined in terms of the angle from coordinate frame A to coordinate frame B.

Finally we can describe pose in terms of a concrete mathematical object and that is a 3 x 3 homogeneous transformation matrix which belongs to the special Euclidean group of dimension 2. The homogeneous transformation matrix contains the rotation matrix and it also contains the translation - that's the vector from the origin frame A to the origin of frame B. So this homogeneous transformation matrix is equivalent to the abstract symbol ksi that we've used earlier. Points to describe in terms of vectors, but when we use the homogeneous transformation, we describe points in terms of homogeneous vectors. We take the original vector with two elements and we append the one element to that.

Composition of poses for which we introduce the abstract O+ operator is performed by matrix multiplication. We multiply the two 3 x 3 matrices together to yield a new 3 x 3 matrix.

Negation which we described previously by the abstract by the O- operator is the inverse of the homogeneous transformation matrix, and remember that the inverse for a homogeneous matrix is not equal to its transpose. That property only belongs to a rotation matrix which is just a little part of the homogeneous transform matrix.

The abstract operated dot which we used to transform a vector from one coordinate frame to another is implemented by multiplying the homogeneous transformation matrix by homogeneous representation of that vector.

#### Code

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.

I think at this moment nobody in the world can teach 2D geometry and pose like Peter Corke. It is perfect pedagogy. Like listening to an orchestra. May be the no of questions in the quiz sections can be increased

Thank you so much, this is a great stepping stone for the representation of rigid bodies in 3D.

The wonderful section here for those who want to study more about robotics. Thanks Prof. Peter Corke, Really great work

Lessons well explained and illustrated with mathematical formulas given by the Professor Peter Corke. Great course! Thanks!

Hi Peter, all. I have a question, which didn’t seem to be covered. Why use cartesian geometry at all? Why not use radial geometry with the actor as its own coordinate frame?

Say I am the moving actor and I am standing in a pentagonal room, and there is a ball near one of the pentagonal corners (my objective). I do not calculate my location from a world coordinate frame then move in one direction (x^) then in a perpendicular direction (y^), as none of the room corners provide a clear right angle. So if I have no world co-ordinate frame I do not calculate the distance of the ball from me WRT an external frame.

Instead I rotate myself so that my x^ is pointing towards my objective (rotational transformation) then close the distance between myself and the objective (1-dimensional locational transformation) until i reach the ball. Not sure why we expect the robot to perform the more complex 2-dimensional calculations (using a world coordinate frame external to itself), when in the same situation I perform a 1-dimensional calculation (using my centre as the coordinate frame).

Thanks for the course, and for making it free!

It’s a good question and reflects something of a split in the way we treat robotics problems. The background of early roboticists in maths and engineering brings us a mindset of 2D or 3D Cartesian coordinates, where we know the pose of the robot and everything else, and we use standard tools to plan how to move. However this requires us to know where the robot is in the Cartesian frame (which is hard) and where the objects are in the Cartesian frame (also hard). We can avoid those two hard problems by, as you say, just moving relative to the object of interest. We control the velocity of the robot until the error is zero. For robots with cameras as sensors this approach is referred to as visual servoing and you can some lessons on the Academy about this.

Thanks Peter, early days but I’m keen to learn more

Hello sir,

I have a doubt in case of composition of relative pose.

how can we say that the composition of two pose is same as multiplication of two matrices.

did we have came to this result by mathematical theorem.

can you give some more light on the significance of matrix multiplication in case of relative pose?

The matrices we use are special, they are a subset of all 4×4 real matrices with a special structure and which belong to the Special Euclidean Group of order 3 or SE(3). This group has the property of describing Euclidean pose.

okay sir.

you are simply amazing prof Peter Corke

Hello! I had a doubt related to the notation for pose. Why is the from-frame and to-frame order reversed between the ksi notation and T-notation despite both being the notations for pose?

where abouts in the video, timecodes, does this occur. It shouldn’t ever be reversed.

thanks professor

the center of rotation or in general Twists in 2D, are explained in the second edition of your book, but not discussed in the online course.

It’a matter of timing. The course was based on edition 1 of the book, Twists got added in edition 2.