0% found this document useful (0 votes)
28 views3 pages

2D Transformations in Robotics

This document discusses 2D transformations using homogeneous transformation matrices. It provides the standard form of the 2D homogeneous transformation matrix and then presents 4 problems involving computing transformations between frames using given transformation matrices and extracting information like orientations and offset vectors from the matrices.

Uploaded by

jiales225
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

2D Transformations in Robotics

This document discusses 2D transformations using homogeneous transformation matrices. It provides the standard form of the 2D homogeneous transformation matrix and then presents 4 problems involving computing transformations between frames using given transformation matrices and extracting information like orientations and offset vectors from the matrices.

Uploaded by

jiales225
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ELEC3201 Robotics Problem Sheet:

2D Transformations
Dr. Matthew Turner

In this problem sheet, we look at the 2D homogenous transformation matrix and associated problems.
For reference, the 2D homogenous transformation matrix, describing the transformation from frame {A} to
frame {B} has the form:
cos α − sin α (A PB,ORG )x
 
A  sin α cos α (A PB,ORG )y 
BT =
0 0 1
Please forgive any typos etc!

1 Questions
1. A 2D homogenous transformation matrix is given by
 
cos α − sin α 4
A  sin α cos α 3 
BT =
0 0 1
where θ = 45◦ . If the position of a particle P w.r.t to frame B is given by
B
P = [1 1]0

find its postion w.r.t to frame A.


2. Given a 2D homogenous transformation matrix
 
−1 0 4
A  0 −1 3 
BT =
0 0 1
determine the orientation of A w.r.t B, the position vector describing the offset of the origin of B w.r.t
A and also the distance between the two origins.
3. Consider two homogenous transformation matrices:
 √ √   
√ 2/2 −√ 2/2 2 −1 0 3
A B  0 −1 2 
BT = CT =
 2/2 2/2 1 
0 0 1 0 0 1

Find the homogenous transformation matrix A A B


C T =B T C T , the rotation angle of C w.r.t. A and the
position vector describing the offset of the origin from C w.r.t. A.

1
4. Using the expressions from the previous question verify that order matters when computing products
and transformations i.e verify
A B B A
B T C T 6= C T B T

2 Solutions
1. Recall from the lectures that
A
P̃ =A
B T
B

and that A  B 
A P B P
P̃ = P̃ =
1 1
This gives  
1
B
P̃ = 1

1
With α = 45◦ we have  √ √ 
√ 2/2 −
√ 2/2 4
A
BT =
 2/2 2/2 3 
0 0 1
Hence
 √ √  
√ 2/2 −√ 2/2 4 1
A
P̃ =  2/2 2/2 3  1
0 0 1 1
 
4√
= 3 + 2

1

From which we have  


A 4√
P =
3+ 2

2. Comparing the given matrix with the standard form of rotation matrix we see that

cos α = −1 ⇒ α = 180◦

We can also directly read off the position vector relating the origins of the frames A and B:
 
4
3

The distance is then the magnitude (Euclidean norm) of this vector


 
4 p
= 42 + 32 = 5
3

2
3. The answer to this question needs a little though because the second rotation matrix contains a rotation
of beyond 90◦ . The first part is just some simple matrix multiplication:
A
CT =A B
B T CT
 √ √  
√2/2 −√ 2/2 2 −1 0 3
=  2/2 2/2 1   0 −1 2 
0 0 1 0 0 1
 √ √ √ 
−√2/2 √2/2 2 + √2/2
=  − 2/2 − 2/2 1 + 5 2/2 
0 0 1

The position vector is then  √ 


2 + √2/2
1 + 5 2/2
However what is the rotation angle? We know from the transformation matrix that we have
√ √
cos α = − 2/2 sin α = 2/2

Naive application of inverse trigonometric functions gives inconsistent answers. In fact, the robust
manner of doing this is to use the atan2 function (more on this later):
√ √
α = atan2(− 2/2, − 2/2) (1)
= −135◦ (2)

Verify that this is indeed correct using some sketches.

4. To verify that
A B B A
BT C T 6= C T BT

we simply need to calculate B


CT
AT :
B

  √ √ 
−1 0 3 √2/2 −√ 2/2 2
B A
C T BT =
 0 −1 2   2/2 2/2 1 
0 0 1 0 0 1
 √ √ 
−√2/2 √2/2 1
=  − 2/2 − 2/2 1 
0 0 1

Common questions

Powered by AI

The orientation of frame A with respect to frame B is determined from the rotation part of the 2D transformation matrix A BT = \[ \begin{pmatrix} -1 & 0 & 4 \\ 0 & -1 & 3 \\ 0 & 0 & 1 \end{pmatrix} \]. This matrix indicates a rotation angle α of 180°, as cos α = -1. This results in a reflection through the origin, implying that frame A is 180° rotated relative to frame B. The position vector offset from the origin of B to A is \[ 4 \, 3 \], and the Euclidean distance between the origins is \[ \sqrt{4^2 + 3^2} = 5 \].

Rotation angles beyond 90° in transformation matrices indicate significant angular displacements, affecting the kinematic behavior of mechanical systems such as robotics. These angles can lead to complex orientation changes, complicating motion control, trajectory planning, and inverse kinematics. For example, a rotation angle derived as -135° from matrix multiplication, utilizing atan2, signifies a backward counterclockwise rotation that could impact end-effector direction and task execution complexity in robotic arms, necessitating careful system calibration and control algorithms .

Naive application of inverse trigonometric functions can lead to incorrect angles in transformation matrices because these functions do not uniquely determine the angle for all quadrants, potentially resulting in ambiguous or incorrect angles. To correct this, the atan2 function should be used, as it factors in the sign of both components, gratifying quadrant determination definitively. This eliminates ambiguities seen with simple invocations of cosine or sine functions. Specifically, in transformation matrices with components like \(-\frac{\sqrt{2}}{2}\), atan2 is employed to ascertain the correct -135° rotation angle .

The Euclidean distance between the origins of two frames, given a 2D transformation matrix A BT = \[ \begin{pmatrix} -1 & 0 & 4 \\ 0 & -1 & 3 \\ 0 & 0 & 1 \end{pmatrix} \], is calculated using the position vector \[ 4 \, 3 \]. The distance is the Euclidean norm \[ \sqrt{4^2 + 3^2} = 5 \]. This distance is significant in robotics for determining the reachability and positioning of robotic arms or mobile robots, as precise calculations ensure exact placement and movement between coordinate frames .

Reflection observed in matrix transformations involves a change in orientation achieved by coefficients like -1 in a transformation matrix, resulting in a 180° rotation or inversion about an axis. This affects symmetry considerations in engineering by enabling mirroring adjustments in design and analysis, critical for applications involving bilateral symmetry or configuring robotic manipulators with precise orientation flips. Utilizing reflection properties allows for innovative approaches to mechanical design and control, ensuring seamless adaptability and enhanced functionality in symmetrical operations .

In transformation matrices, the atan2 function accurately computes the rotation angle by considering the signs of the cosine and sine components, thereby placing the angle in the correct quadrant. For instance, with the matrix \[ \begin{pmatrix} -\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} \end{pmatrix} \], normal inverse trigonometric functions may yield inconsistent angles, while atan2, used as atan2(-\frac{\sqrt{2}}{2}, -\frac{\sqrt{2}}{2}), provides -135°, accurately reflecting a counterclockwise rotation .

The resultant transformation matrix A CT from two matrices A BT and B CT is obtained by matrix multiplication: A CT = A BT B CT. For A BT = \[ \begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 2 \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 1 \\ 0 & 0 & 1 \end{pmatrix} \] and B CT = \[ \begin{pmatrix} -1 & 0 & 3 \\ 0 & -1 & 2 \\ 0 & 0 & 1 \end{pmatrix} \], the product is A CT = \[ \begin{pmatrix} -\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 2 + \frac{\sqrt{2}}{2} \\ -\frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 1 + 5\frac{\sqrt{2}}{2} \\ 0 & 0 & 1 \end{pmatrix} \]. The rotation angle α derived using atan2 from the rotation components \(-\frac{\sqrt{2}}{2}, -\frac{\sqrt{2}}{2}\) is α = atan2(-\frac{\sqrt{2}}{2}, -\frac{\sqrt{2}}{2}) = -135°. This negative angle indicates a counterclockwise rotation perspective when viewed conventionally .

The order of matrix multiplication is crucial in transformations because matrix multiplication is non-commutative; thus, A BT B CT generally differs from B CT A BT. Using specific transformations, A BT = \[ \begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 2 \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 1 \\ 0 & 0 & 1 \end{pmatrix} \] and B CT = \[ \begin{pmatrix} -1 & 0 & 3 \\ 0 & -1 & 2 \\ 0 & 0 & 1 \end{pmatrix} \], we calculate B CT A BT = \[ \begin{pmatrix} -\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 1 \\ -\frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 1 \\ 0 & 0 & 1 \end{pmatrix} \], which differs from the previously computed A CT when A BT is multiplied by B CT first. This discrepancy shows that the positioning and orientation of transformed frames depend on the sequence of transformations, influencing applications such as robotic arm motion sequencing .

The transformation of a particle from frame B to frame A using a 2D transformation matrix is computed by multiplying the matrix A BT with the homogenous coordinates of the particle in frame B. For a particle P with coordinates BP = [1 1]' and a transformation matrix A BT with angle θ = 45° given by A BT = \[ \begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 4 \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 3 \\ 0 & 0 & 1 \end{pmatrix} \], the transformed position AP in frame A is calculated as A ˜P = A BT B ˜P = \[ \begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 4 \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 3 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix} \] resulting in AP = \[ 4 \quad 3 + \sqrt{2} \].

Applying a homogeneous transformation matrix alters the position and orientation of a given point by executing a rotation and translation as indicated in the matrix. The matrix A BT = \[ \begin{pmatrix} \frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2} & 4 \\ \frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2} & 3 \\ 0 & 0 & 1 \end{pmatrix} \], applied to a point BP = [1 1]', results in the point's new position AP = [4 \quad 3 + \sqrt{2}]'. The rotation matrix \(cos α = sin α = \frac{\sqrt{2}}{2}\) signifies an orientation change of 45°, while the translation components (4, 3) shift the point's position .

You might also like