Robotics Kinematics and Dynamics/Description of Position and Orientation

From testwiki
Revision as of 16:17, 25 January 2008 by 193.190.253.146 (talk) (Euler Angles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: Some illustrative figures still have to be added.

In general, a rigid body has six degrees of freedom in three-dimensional space: three rotational degrees of freedom, and three translational ones.

Rotation Matrix

The position and orientation of a rigid body can be described by attaching a frame to it.

A conventional way to describe the position and orientation of a rigid body is to attach a frame to it. After defining a reference coordinate system, the position and orientation of the rigid body are fully described by the position of the frame's origin and the orientation of its axes, relative to the reference frame.

A rotation matrix is very often used to describe the relative orientation of two such frames. The columns of this 3 × 3 matrix consist of the unit vectors along the axes of one frame, relative to the other, reference frame. Thus, the relative orientation of a frame {b} with respect to a reference frame {a} is given by the rotation matrix abR:

abR=(axbaybazb)=(xbxaybxazbxaxbyaybyazbyaxbzaybzazbza)

Rotation matrices can be interpreted in two ways: active (the first frame is rotated into the second), or passive (the mutual orientation between two coordinate systems).

The coordinates, relative to a frame {a}, of a point p, of which the coordinates are known with respect to a frame {b} with the same origin, can then be calculated as follows: ap=abRbp.

Properties

Some of the properties of the rotation matrix that may be of practical value:

  1. Since abR is orthogonal, baR=abR1=abRT.
  2. A rotation matrix is a non-minimal description of a rigid body's orientation. That is, it uses nine numbers to represent an orientation instead of just three. Non-minimal representations often have some numerical advantages, though. They also do not exhibit coordinate singularities.

Elementary Rotations about Frame Axes

Rotation by an angle γ about the z-axis.

The expressions for elementary rotations about frame axes can easily be derived. From the figure on the right, it can be seen that the rotation of a frame by an angle γ about the z-axis, is described by:

Rz(γ)=(cos(γ)sin(γ)0sin(γ)cos(γ)0001)

Similarly, it can be shown that the rotation of a frame by an angle α about the x-axis, is given by:

Rx(α)=(1000cos(α)sin(α)0sin(α)cos(α))

Derived in exactly the same manner, the rotation of a frame by an angle β about the y-axis, is described by:

Ry(β)=(cos(β)0sin(β)010sin(β)0cos(β))

Compound Rotations

Compound rotations are found by multiplication of the different rotation matrices.

The matrix corresponding to a set of rotations about moving axes can be found by postmultiplying the rotation matrices, thus multiplying them in the the same order in which the rotations take place. The rotation matrix formed by a rotation by an angle α about the z-axis followed by a rotation by an angle β about the moved y-axis, is then given by:

R(zy,α,β)=R(z,α)R(y,β)

The composition of rotations about fixed axes, on the other hand, is found by premultiplying the different rotation matrices.

Inverse Rotations

The inverse of a single rotation about a frame axis is a rotation by the negative of the rotation angle about the same axis:

R1(z,α)=R(z,α)

The inverse of a compound rotation follows from the inverse of the matrix product.

R1(zy,α,β)=R1(y,β)R1(z,α)

Euler Angles

Contrary to the rotation matrix, Euler angles are a minimal representation (a set of just three numbers, that is) of relative orientation. This set of three angles set describes a sequence of rotations about the axes of a moving reference frame. There are, however, many sets that describe the same orientation: different combinations of axes (e.g. ZXZ, ZYZ, and so on) lead to different Euler angles. Euler angles are often used for the description of the orientation of the wrist-like end-effectors of many serial manipulator robots.

Note: Identical axes should not be in consecutive places (e.g. ZZX). Also, the range of the Euler angles should be limited in order to avoid different angles for the same orientation. E.g.: for the case of ZYZ Euler angles, the first rotation about the z-axis should be within [π,π]. The second rotation, about the moved y-axis, has a range of [π/2,π/2]. The last rotation, about the moved z-axis, has a range of [π,π].

Forward Mapping

Forward mapping, or finding the orientation of the end-effector with respect to the base frame, follows from the composition of rotations about moving axes. For a rotation by an angle α about the z-axis, followed by a rotation by an angle β about the moved y-axis, and a final rotation by an angle γ about the moved z-axis, the resulting rotation matrix is:

bseeR=R(ZXZ,α,β,γ)=R(Z,α)R(X,β)R(Z,γ)

After writing out:

R(ZXZ,α,β,γ)=(cγcαsγcβsαsγcαcγcβsαsβsαcγsα+sγcβcαsγsαcγcβcαsβcαsγsβcγsβcβ)

Inverse Mapping

In order to drive the end-effector, the inverse problem must be solved: given a certain orientation matrix, which are the Euler angles that accomplish this orientation?

For the above case, the Euler angles α, β and γ are found by inspection of the rotation matrix:

α=atan2(R13,R23)

β=atan2(R32cα+R13sα,R33)

γ=atan2(R31,R32)

Coordinate Singularities

In the above example, a coordinate singularity exists for β=0. The above equations are badly numerically conditioned for small values of β: the first and last equaton become undefined. This corresponds with an alignment of the first and last axes of the end-effector. The occurrence of a coordinate singularity involves the loss of a degree of freedom: in the case of the above example, small rotations about the y-axis require impossibly large rotations about the x- and z-axes.

No minimal representation of orientation can globally describe all orientations without coordinate singularities occurring.

Roll-Pitch-Yaw Angles

The orientation of a rigid body can equally well be described by three consecutive rotations about fixed axes. This leads to a notation with Roll-Pitch-Yaw (RPY) angles.

Forward Mapping

The forward mapping of RPY angles to a rotation matrix similar to that of Euler angles. Since the frame now rotates about fixed axes instead of moving axes, the order in which the different rotation matrices are multiplied is inversed:

R(RPY,r,p,y)=R(Z,y)R(Y,p)R(X,r)

After writing out:

R(RPY,r,p,y)=(cycpcyspsrsycrcyspcr+sysrsycpsyspsr+cycrsyspcrcysrspcpsrcpcr)

Inverse Mapping

The inverse relationships are found from inspection of the rotation matrix above:

r=atan2(R32,R33)

p=atan2(R21,R11)

y=atan2(R31,cyR11+syR21)

Note: The above equations are badly numerically conditioned for values of p near π/2 and π/2.

Homogeneous Transform

The notations above describe only relative orientation. The coordinates of a point, relative to a frame {b}, rotated and translated with respect to a reference frame {a}, are given by:

ap=abRbp+apa,b

This can be compacted into the form of a homogeneous transformation matrix or pose (matrix). It is defined as follows:

abT=(baRapa,b01×31)

This matrix represents the position and orientation of a frame {b} whose origin, relative to a reference frame {a}, is described by apa,b, and whose orientation, relative to the same reference frame {a}, is described by the rotation matrix abR.

abT is, thus, the representation of a frame in three-dimensional space. If the coordinates of a point p are known with respect to a frame {b}, then its coordinates, relative to a are found by:

(ap1)= abT(bp1)

This is the same as writing:

ap=abRbp+apa,b

Note that the above vectors are extended with a fourth coordinate equal to one: they're made homogeneous.

As was the case with rotation matrices, homogeneous transformation matrices can be interpreted in an active ("displacement"), and a passive ("pose") manner. It is also a non-minimal representation of a pose, that does not suffer from coordinate singularities.

Compound Poses

If the pose of a frame {c} is known, relative to {b}, whose pose is known with respect to a third frame {a}, the resulting pose acT is found as follows:

acT=abTbcT