CSE276A - Mathematics behind Coordinate Transformations
Introduction
- How to describe the relationship between two coordinate frames?
- If I know a point in frame A, how to compute the point in frame B?
Homogeneous Transformation Matrix
If we have constructed two coordinates (e.g., robot base link frame and camera frame), how to describe the transformation between the two coordinates? Suppose we want to find a matrix that can map coordinates in camera frame to robot frame, denoted by
Translation
The child frame’s origin (camera) in the parent frame (robot).
Rotation
A useful online rotation representation converter: rotation converter.
Euler Angles
Any 3D orientation can be achieved by performing three sequential rotations around a set of defined axes. The order matters for Euler angles. As a result, a 3-dimensional euler vector cannot describe an orientation unless we specify the rotation order.
Rotation Matrix
A 3x3 matrix where the columns are the child frame’s (camera’s) X, Y, and Z axes, as described in the parent frame’s (robot’s) coordinates.
Quaternion
Instead of 3 separate rotations, a quaternion represents orientation as a single rotation around one specific axis in 3D space. The quaternion representation is 4 dimensional.
Transformation
After obtaining transformation and rotation, this 4x4 transformation matrix is constructed by plugging in the 3x3 rotation matrix and the 3x1 translation vector .
This matrix can transform any point defined in the camera_frame coordinates directly into its corresponding point in the base_link frame coordinates with a single matrix multiplication:
Application
- Chaining Transforms
- Transform a Point Between Frames
- Inverse of Transformation