The Special Orthogonal Group is the set of all rotation matrices in dimensions. is the set of all rotations in 2D and is the set of all rotations in 3D. This note also covers the axis-angle (rotation vector) way of describing a 3D rotation, which is the form URScript uses.


, Rotations in 2D

A 2D rotation by angle is:

Every 2D rotation lives in , and it has 1 degree of freedom:

  • is the only variable, so one parameter fully specifies the rotation
  • every point on the unit circle corresponds to one rotation angle
  • one parameter gives one loop, which is 1 DOF

, Rotations in 3D

is the set of all rotations in 3D space. It has 3 degrees of freedom, since we can rotate about any of the , , axes, and we need 3 numbers (for example roll, pitch, yaw) to fully specify a 3D rotation.

Counting the DOF straight from the matrix:

  • a 3D rotation matrix has 9 entries
  • orthogonality imposes 6 constraints
  • , so has 3 DOF

Two properties hold for any rotation matrix :

The full per-axis rotation matrices are detailed in Rotation Matrices.


vs

A key structural difference:

  • is commutative, so the order of two 2D rotations does not change the result
  • is non-commutative, so in general

Angular Velocity Vector

A short aside on how a rotating frame moves over time:

  • it is written , a unit axis times the rate of rotation
  • if a body frame's axis traces a circle, the linear velocity of that axis is tangent to the circle,

The Rotation Vector (Axis-Angle)

A 3D rotation can be packed into a single rotation vector :

  • the direction of is the rotation axis
  • the magnitude of is the rotation angle

Given , recover the axis and angle by:

In URScript the rotation vector is the last three numbers of a pose, inside .


Worked Examples

Rotate 90 degrees about the z axis:

  • axis , angle
  • rotation vector
  • in URScript, p[x, y, z, 0, 0, 1.5708]

Rotate 180 degrees about the x axis:

  • axis , angle
  • rotation vector
  • in URScript, p[x, y, z, 3.1416, 0, 0]

Rotate 60 degrees about the diagonal axis :

  • axis , angle
  • rotation vector
  • in URScript, p[x, y, z, 0.604, 0.604, 0.604]

A full pose from the notes is p[0.2, 0.5, 0.1, 0, 0, 3.14], where the orientation part is about the axis , a half turn about .


Rodrigues' Formula

To convert a rotation vector into a rotation matrix , use Rodrigues' formula. This matters because URScript stores orientation as axis-angle, but the controller composes rotations as matrices, so converting between the two means going through the matrix form.

For a unit axis and angle :

Where:

  • is the identity matrix
  • is the skew-symmetric matrix of
  • is that matrix multiplied by itself