Chapter 2: Rigid-Body Motion and Lie Groups
Lesson 1: Rigid Bodies and Configuration Space
This lesson introduces the mathematical model of a rigid body and the notion of configuration space for single bodies and multi-joint mechanisms. We formalize how a rigid body configuration is represented by a rotation and translation, and how generalized coordinates assemble into configuration manifolds such as intervals, circles, and their products. These structures are the geometric stage on which kinematics and dynamics will be developed in later chapters.
1. Conceptual Overview
A rigid body is an idealized mechanical object in which distances between material points never change. A configuration of a robot is a complete specification of all rigid-body poses (links) consistent with the joints and constraints. The set of all such configurations forms the configuration space, often denoted by \( \mathcal{Q} \).
At a high level, modeling proceeds as:
\[ \text{Physical mechanism} \;\longrightarrow\; \text{Rigid-body idealization} \;\longrightarrow\; \\ \text{Joints and generalized coordinates} \;\longrightarrow\; \mathcal{Q} \text{ (configuration space)}. \]
For a single rigid body in 3D, a configuration can be represented as a pair \( (R,p) \) where \( R \in \mathrm{SO}(3) \) is a rotation matrix and \( p \in \mathbb{R}^3 \) is a translation vector. The configuration space of one free rigid body in 3D is therefore:
\[ \mathcal{Q}_{\text{rigid}} = \left\{ (R,p) \,\middle|\, R \in \mathrm{SO}(3),\; p \in \mathbb{R}^3 \right\}. \]
For an \( n \)-DOF serial robot with joint coordinates \( q = (q_1,\dots,q_n) \), the configuration space is typically a product of lower-dimensional spaces:
\[ \mathcal{Q} = \mathcal{Q}_1 \times \cdots \times \mathcal{Q}_n, \]
where each factor \( \mathcal{Q}_i \) encodes the admissible values of the corresponding joint (e.g. intervals for prismatic joints, circles for revolute joints).
flowchart TD
A["Physical mechanism"] --> B["Ideal rigid-body model"]
B --> C["Identify links and joints"]
C --> D["Choose generalized coordinates q"]
D --> E["Define configuration space Q"]
E --> F["Use Q for kinematics and dynamics"]
2. Mathematical Model of a Rigid Body
Consider a body as a set of labeled material points \( \mathcal{B} = \{ P_i \}_{i \in I} \) embedded in \( \mathbb{R}^3 \). Let \( x_i(t) \in \mathbb{R}^3 \) denote the position of point \( P_i \) at time \( t \). The body is rigid if the pairwise distances are invariant:
\[ \| x_i(t) - x_j(t) \|^2 = \| x_i(0) - x_j(0) \|^2, \quad \forall i,j \in I,\; \forall t. \]
It is a classical result from Euclidean geometry that any distance-preserving transformation of \( \mathbb{R}^3 \) has the form
\[ x \mapsto R x + p, \]
where \( R \in \mathrm{O}(3) \) is an orthogonal matrix (\( R^\top R = I \)) and \( p \in \mathbb{R}^3 \). Restricting to motions that preserve orientation yields \( \det R = 1 \), so:
\[ R \in \mathrm{SO}(3) = \left\{ R \in \mathbb{R}^{3\times 3} \,\middle|\, R^\top R = I,\; \det R = 1 \right\}. \]
Thus, the configuration of a rigid body at time \( t \) can be described by a rotation matrix \( R(t) \) and a translation vector \( p(t) \).
3. Reference Frames and Coordinate Representations
To carry out computations, we attach coordinate frames to space and to each body. Let \( \{ S \} \) be a fixed space (or world) frame and \( \{ B \} \) be a frame rigidly attached to the body. For any material point \( P \) on the body, denote its coordinates in the two frames by \( {}^{S}p \in \mathbb{R}^3 \) and \( {}^{B}p \in \mathbb{R}^3 \). Then:
\[ {}^{S}p = R_{S B}\,{}^{B}p + p_{S B}, \]
where:
- \( R_{S B} \in \mathrm{SO}(3) \) is the rotation matrix whose columns are the unit vectors of frame \( \{ B \} \) expressed in frame \( \{ S \} \).
- \( p_{S B} \in \mathbb{R}^3 \) is the position of the origin of frame \( \{ B \} \) relative to frame \( \{ S \} \).
The pair \( (R_{S B}, p_{S B}) \) completely specifies the pose of the body frame relative to the space frame. In later lessons, we will package this information into a single \( 4 \times 4 \) homogeneous transformation matrix and study its algebraic structure in detail.
From a control-engineering perspective, the configuration variables (entries of \( R_{S B} \) and \( p_{S B} \), or joint coordinates assembled into \( q \)) are the generalized states on which kinematic and dynamic models depend.
4. Configuration of a Single Rigid Body in 3D
For a single unconstrained rigid body in \( \mathbb{R}^3 \), a configuration is given by a rotation \( R \) and translation \( p \). Hence the configuration space is
\[ \mathcal{Q}_{\text{rigid}} = \mathbb{R}^3 \times \mathrm{SO}(3). \]
This set has the structure of a smooth 6-dimensional manifold:
- The translation part \( p \in \mathbb{R}^3 \) contributes 3 degrees of freedom.
- The orientation part \( R \in \mathrm{SO}(3) \) contributes 3 degrees of freedom (locally), because \( \mathrm{SO}(3) \) is a 3-dimensional manifold.
Hence the rigid body has 6 degrees of freedom (DOF). Common parametrizations of \( \mathrm{SO}(3) \) include:
- Euler angles (to be discussed in Chapter 3);
- axis–angle representations;
- unit quaternions (also in Chapter 3);
- exponential coordinates derived from the Lie algebra (later in this chapter).
Each parametrization defines a local coordinate chart on \( \mathrm{SO}(3) \), and hence local coordinates on \( \mathcal{Q}_{\text{rigid}} \). However, due to the nonlinear topology of \( \mathrm{SO}(3) \), no single global chart exists that is both smooth and one-to-one everywhere (this underlies singularities of Euler angles).
5. Configuration Space of Robotic Mechanisms
Consider a robot mechanism with \( n \) joints. We select generalized coordinates \( q = (q_1,\dots,q_n) \) where each \( q_i \) uniquely specifies the state of joint \( i \). Typical joint types are:
- Revolute joint: configuration space \( \mathcal{Q}_i \cong S^1 \) (a circle). A joint angle \( q_i \) is defined modulo \( 2\pi \).
- Prismatic joint: configuration space \( \mathcal{Q}_i \subset \mathbb{R} \), often an interval encoding joint limits, e.g. \( \mathcal{Q}_i = [q_i^{\min}, q_i^{\max}] \).
- Helical, cylindrical, spherical joints etc., which can be built as combinations or constraints of the basic ones (discussed more fully in later chapters).
The full configuration space is the Cartesian product
\[ \mathcal{Q} = \mathcal{Q}_1 \times \cdots \times \mathcal{Q}_n. \]
If all joints are unconstrained (no joint limits or mechanical couplings) and there are no loop-closure constraints, then the dimension of \( \mathcal{Q} \) equals the number of independent joints:
\[ \dim \mathcal{Q} = n. \]
Examples:
- A planar 2R elbow manipulator (two revolute joints in the plane) has \( \mathcal{Q} \cong S^1 \times S^1 \), a 2-dimensional torus.
- A SCARA-type \( RRP \) arm (revolute–revolute–prismatic) has \( \mathcal{Q} \cong S^1 \times S^1 \times I \), where \( I \subset \mathbb{R} \) is an interval of prismatic extension.
The workspace (or task space) \( \mathcal{W} \) is the set of reachable end-effector poses, typically a subset of \( \mathcal{Q}_{\text{rigid}} \). The forward kinematics map, to be formulated in later chapters, is a smooth map
\[ f : \mathcal{Q} \rightarrow \mathcal{W} \subset \mathbb{R}^3 \times \mathrm{SO}(3), \]
associating to each joint configuration \( q \) a rigid-body pose \( (R,p) \).
6. Topology and Manifold Structure of Configuration Space
Configuration spaces encountered in robotics are typically smooth manifolds, possibly with boundaries (due to joint limits) and possibly with several disconnected components.
Example 1 (Single revolute joint). The configuration space is the unit circle
\[ S^1 = \left\{ (x,y) \in \mathbb{R}^2 \,\middle|\, x^2 + y^2 = 1 \right\}. \]
A local coordinate chart is provided by an angle \( \theta \in (-\pi,\pi) \), with
\[ \varphi(\theta) = (\cos\theta, \sin\theta), \quad \varphi : (-\pi,\pi) \rightarrow S^1\setminus\{(-1,0)\}. \]
Example 2 (Planar 2R arm). The configuration space is \( S^1 \times S^1 \), a 2-dimensional torus. Locally, one can use the angular coordinates \( (\theta_1, \theta_2) \in (-\pi,\pi) \times (-\pi,\pi) \), but globally the topology is not that of a plane due to periodicity.
More generally, suppose joint coordinates \( q \in \mathbb{R}^n \) are subject to holonomic equality constraints \( c(q) = 0 \) with \( c : \mathbb{R}^n \rightarrow \mathbb{R}^r \). The constrained configuration space is
\[ \mathcal{Q}_c = \left\{ q \in \mathbb{R}^n \,\middle|\, c(q)=0 \right\}. \]
If the Jacobian matrix \( J_c(q) = \dfrac{\partial c}{\partial q}(q) \) has rank \( r \) at a point \( q^\star \), then by the implicit function theorem, \( \mathcal{Q}_c \) is locally a smooth manifold of dimension
\[ \dim \mathcal{Q}_c = n - r. \]
This dimension-counting principle underlies the classical degrees-of-freedom formulas for mechanisms with loop closures, which will be revisited in Chapter 4.
flowchart LR
J1["Revolute joint: S1"] --> J2["Planar 2R: S1 x S1 (torus)"]
J2 --> J3["Planar 3R: S1 x S1 x S1"]
P1["Prismatic joint: interval in R"] --> MIX["Mixed joints: product of circles and intervals"]
7. Python, C++, and Java Representations of Configurations
In software, we typically distinguish between:
- Joint-space configurations \( q \in \mathbb{R}^n \) or products of intervals and circles.
- Task-space configurations \( (R,p) \in \mathbb{R}^3 \times \mathrm{SO}(3) \).
Robotics libraries provide convenient abstractions for these objects:
-
Python:
numpyfor matrices, and higher-level libraries such asroboticstoolbox-pythonorpytransform3d. -
C++:
Eigenfor linear algebra, plus robotics libraries such asorocos_kdland ROStf2. -
Java: matrix libraries such as
EJMLorApache Commons Mathfor implementing basic rotation and configuration operations.
7.1 Python: Rigid Body Configuration Class
import numpy as np
class RigidBodyConfig:
"""
Represent a rigid body configuration as (R, p),
where R is a 3x3 rotation matrix and p is a 3D position vector.
"""
def __init__(self, R, p):
self.R = np.asarray(R, dtype=float).reshape(3, 3)
self.p = np.asarray(p, dtype=float).reshape(3)
def is_valid(self, tol=1e-6):
"""Check R in SO(3) numerically."""
RT_R = self.R.T @ self.R
I = np.eye(3)
cond_orthonormal = np.allclose(RT_R, I, atol=tol)
cond_det = np.isclose(np.linalg.det(self.R), 1.0, atol=tol)
return cond_orthonormal and cond_det
# Example: identity pose at the origin
R = np.eye(3)
p = np.zeros(3)
q = RigidBodyConfig(R, p)
print("Valid configuration:", q.is_valid())
# Simple joint-space example: planar 2R joint coordinates
def planar_2R_joint_config(theta1, theta2):
"""
Return the joint configuration q = [theta1, theta2]^T.
Forward kinematics mapping to workspace will be introduced later.
"""
return np.array([theta1, theta2], dtype=float)
q_joint = planar_2R_joint_config(0.5, -0.3)
print("Joint configuration q:", q_joint)
7.2 C++ with Eigen: Configuration Structure
#include <Eigen/Dense>
#include <iostream>
struct RigidBodyConfig {
Eigen::Matrix3d R;
Eigen::Vector3d p;
};
bool isValidRotation(const Eigen::Matrix3d& R, double tol = 1e-6) {
Eigen::Matrix3d RT_R = R.transpose() * R;
Eigen::Matrix3d I = Eigen::Matrix3d::Identity();
double orth_error = (RT_R - I).norm();
double det_error = std::abs(R.determinant() - 1.0);
return (orth_error <= tol) && (det_error <= tol);
}
int main() {
RigidBodyConfig q;
q.R = Eigen::Matrix3d::Identity();
q.p = Eigen::Vector3d::Zero();
std::cout << "Valid configuration: "
<< (isValidRotation(q.R) ? "yes" : "no")
<< std::endl;
// Simple joint-space example: planar 2R arm
Eigen::Vector2d q_joint;
q_joint << 0.5, -0.3;
std::cout << "q = [" << q_joint(0) << ", " << q_joint(1) << "]" << std::endl;
return 0;
}
7.3 Java: Minimal Configuration Utilities
public class RigidBodyConfig {
// R is 3x3 row-major matrix, p is length-3 vector
public double[][] R;
public double[] p;
public RigidBodyConfig(double[][] R, double[] p) {
this.R = R;
this.p = p;
}
public static double[][] identity3x3() {
return new double[][] {
{1.0, 0.0, 0.0},
{0.0, 1.0, 0.0},
{0.0, 0.0, 1.0}
};
}
public static double[][] transpose3x3(double[][] A) {
double[][] T = new double[3][3];
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
T[i][j] = A[j][i];
}
}
return T;
}
public static double[][] multiply3x3(double[][] A, double[][] B) {
double[][] C = new double[3][3];
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
C[i][j] = 0.0;
for (int k = 0; k < 3; ++k) {
C[i][j] += A[i][k] * B[k][j];
}
}
}
return C;
}
public static double frobeniusNormDiff(double[][] A, double[][] B) {
double s = 0.0;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
double d = A[i][j] - B[i][j];
s += d * d;
}
}
return Math.sqrt(s);
}
public static boolean isValidRotation(double[][] R, double tol) {
double[][] RT = transpose3x3(R);
double[][] RT_R = multiply3x3(RT, R);
double[][] I = identity3x3();
double err = frobeniusNormDiff(RT_R, I);
// A full implementation would also check det(R) close to 1
return err <= tol;
}
public static void main(String[] args) {
double[][] R = identity3x3();
double[] p = new double[] {0.0, 0.0, 0.0};
RigidBodyConfig q = new RigidBodyConfig(R, p);
System.out.println("Valid rotation: " + isValidRotation(q.R, 1e-6));
// Joint-space example: planar 2R arm configuration
double[] qJoint = new double[] {0.5, -0.3};
System.out.println("q = [" + qJoint[0] + ", " + qJoint[1] + "]");
}
}
8. MATLAB/Simulink and Wolfram Mathematica Implementations
8.1 MATLAB: Configuration Validation and Joint-Space Representation
MATLAB (and the Robotics System Toolbox) provides high-level
abstractions such as
rigidBodyTree for representing configuration spaces. Here
we implement a basic configuration check and a joint-space configuration
for a planar 2R arm.
function demo_configurations()
% Rigid body configuration as (R, p)
R = eye(3);
p = zeros(3,1);
q = struct('R', R, 'p', p);
fprintf('Valid rotation: %d\n', isRotationMatrix(q.R));
% Joint-space configuration for planar 2R arm
theta1 = 0.5;
theta2 = -0.3;
q_joint = [theta1; theta2];
disp('Joint configuration q:');
disp(q_joint);
% With Robotics System Toolbox, one would instead use:
% robot = rigidBodyTree;
% ... (add bodies and joints)
% q_struct = homeConfiguration(robot);
end
function flag = isRotationMatrix(R)
I = eye(3);
RT_R = R' * R;
orth_error = norm(RT_R - I, 'fro');
det_error = abs(det(R) - 1.0);
tol = 1e-6;
flag = (orth_error <= tol) && (det_error <= tol);
end
In Simulink, a typical pattern is to represent the joint-space configuration \( q(t) \) as a bus signal or vector signal feeding kinematic and dynamic blocks; the configuration-space representation itself is the static structure of signals and parameters, while the actual simulation trajectories evolve over time.
8.2 Wolfram Mathematica: Symbolic Configuration Manipulation
Wolfram Mathematica is well suited for symbolic manipulations involving configuration spaces and rotation matrices.
(* Define a 3D rotation about the z-axis by angle theta *)
Rz[theta_] := RotationMatrix[theta, {0, 0, 1}];
(* Rigid-body configuration as {R, p} *)
RigidBodyConfig[R_, p_] := << R, p >>;
(* Check orthonormality of a rotation matrix symbolically *)
isRotationMatrix[R_] := Simplify[Transpose[R].R == IdentityMatrix[3] && Det[R] == 1];
(* Example: configuration of a planar rigid body in 3D *)
theta = Symbol["theta"];
R = Rz[theta];
p = {px, py, 0};
qRigid = RigidBodyConfig[R, p];
Print["Is R a rotation matrix? ", isRotationMatrix[R]];
In later chapters, similar symbolic representations will be used to derive Jacobians and equations of motion directly from configuration-space descriptions.
9. Problems and Solutions
Problem 1 (Planar rigid body configuration space). Consider a rigid body constrained to move in the plane \( \mathbb{R}^2 \). Show that its configuration space is diffeomorphic to \( \mathbb{R}^2 \times S^1 \) and has 3 degrees of freedom.
Solution. A planar rigid body can translate along the \( x \)- and \( y \)-axes and rotate about an axis orthogonal to the plane (say the \( z \)-axis). Let \( (x,y) \in \mathbb{R}^2 \) be the position of some reference point on the body (e.g. its center of mass) and let \( \theta \in S^1 \) be the orientation angle. The configuration can be parameterized by \( (x,y,\theta) \). The translation contributes 2 DOF and rotation contributes 1 DOF, so the total DOF is 3. Up to smooth coordinate changes, the configuration space is \( \mathbb{R}^2 \times S^1 \), a 3-dimensional manifold.
Problem 2 (Free rigid body in 3D). Show that a free rigid body in 3D has 6 degrees of freedom, and give a coordinate chart on an open subset of its configuration space.
Solution. As discussed, the configuration of a rigid body in 3D is given by \( (R,p) \) with \( p \in \mathbb{R}^3 \) and \( R \in \mathrm{SO}(3) \). The translation space \( \mathbb{R}^3 \) contributes dimension 3, while the rotation group \( \mathrm{SO}(3) \) is a 3-dimensional manifold (for example, the axis–angle parametrization shows that generic rotations can be represented by a unit axis and angle). Hence the total dimension is \( \dim(\mathbb{R}^3 \times \mathrm{SO}(3)) = 3 + 3 = 6 \). A concrete coordinate chart is given by \( (p,\alpha,\beta,\gamma) \) where \( (\alpha,\beta,\gamma) \) are, for instance, ZYX Euler angles restricted to a domain that avoids gimbal singularities.
Problem 3 (Configuration space of a planar 2R arm). A planar 2R manipulator has two revolute joints with angles \( \theta_1 \) and \( \theta_2 \). Assume there are no joint limits. Describe the configuration space and its topology. Is it simply connected?
Solution. Each revolute joint has configuration space \( S^1 \). With no joint limits or constraints, the configuration space is the Cartesian product \( \mathcal{Q} = S^1 \times S^1 \), which is a 2-dimensional torus. As a manifold, the torus is not simply connected; its fundamental group is \( \mathbb{Z} \times \mathbb{Z} \), corresponding to independent windings around each circular factor. Thus, any continuous loop in \( \mathcal{Q} \) may not be contractible to a point, in contrast to the simply connected space \( \mathbb{R}^2 \).
Problem 4 (Constraint-defined configuration space). Let a point mass move in \( \mathbb{R}^3 \) with coordinates \( x = (x_1,x_2,x_3) \). Impose the holonomic constraint \( c(x) = \|x\|^2 - L^2 = 0 \) for a constant \( L > 0 \). (a) Describe the configuration space. (b) Compute its dimension using the Jacobian rank argument.
Solution. (a) The constraint \( \|x\|^2 = L^2 \) describes the sphere of radius \( L \) centered at the origin: \( \mathcal{Q}_c = \{ x \in \mathbb{R}^3 \mid \|x\| = L \} = S^2 \). (b) Here \( n = 3 \) and there is a single scalar constraint \( c : \mathbb{R}^3 \to \mathbb{R} \). The Jacobian is \[ J_c(x) = \frac{\partial c}{\partial x}(x) = 2 x^\top. \] For any \( x \) with \( \|x\| = L \neq 0 \), we have \( J_c(x) \) of rank 1. Thus by the implicit function theorem, \( \mathcal{Q}_c \) is a smooth manifold of dimension \( \dim \mathcal{Q}_c = 3 - 1 = 2 \), consistent with the fact that the sphere \( S^2 \) is 2-dimensional.
Problem 5 (Numerical test for \( \mathrm{SO}(3) \)). Suppose a numerical algorithm returns a \( 3 \times 3 \) matrix \( R \) intended to be a rotation matrix. Explain a numerically robust test to decide whether \( R \) is close to an element of \( \mathrm{SO}(3) \). Discuss the role of the tolerances.
Solution. A matrix \( R \in \mathbb{R}^{3\times 3} \) is in \( \mathrm{SO}(3) \) if and only if \( R^\top R = I \) and \( \det R = 1 \). Numerically, we test \[ \| R^\top R - I \|_F \leq \varepsilon_{\text{orth}}, \quad | \det R - 1 | \leq \varepsilon_{\det}, \] where \( \|\cdot\|_F \) is the Frobenius norm and \( \varepsilon_{\text{orth}}, \varepsilon_{\det} \) are small positive tolerances chosen based on floating-point precision and problem scaling. If both conditions hold, we accept \( R \) as a valid numerical approximation of a rotation matrix. This is exactly the test implemented in the code snippets in Sections 7 and 8.
10. Summary
In this lesson we formalized the notion of rigid bodies and configuration space. A rigid body configuration is described by a rotation and a translation, leading to the 6-dimensional configuration space \( \mathbb{R}^3 \times \mathrm{SO}(3) \) for a free 3D body. For multi-joint robots, generalized coordinates assemble into configuration spaces that are products of circles, intervals, and constraint-defined manifolds. We emphasized the geometric (topological and manifold) viewpoint and illustrated how these structures are encoded in typical robotics software stacks across multiple languages. Subsequent lessons in this chapter will deepen the study of \( \mathrm{SO}(3) \) and \( \mathrm{SE}(3) \) as Lie groups and will connect these configuration spaces to kinematics and dynamics models.
11. References
- Chasles, M. (1830). Sur les figures de la géométrie, et sur la théorie des mouvements. Journal de l'École Polytechnique, 16, 73–110.
- Cohn-Vossen, S., & Hilbert, D. (1952). Geometry and the Imagination. Chelsea Publishing (classical treatment of rigid motions and isometries).
- Brockett, R. W. (1983). Asymptotic stability and feedback stabilization. In Differential Geometric Control Theory, Birkhäuser, 181–191.
- Lozano-Pérez, T. (1983). Spatial planning: A configuration space approach. IEEE Transactions on Computers, C-32(2), 108–120.
- Schwartz, J. T., & Sharir, M. (1983). On the "piano movers" problem: I. The case of a two-dimensional rigid polygonal body moving amidst polygonal barriers. Communications on Pure and Applied Mathematics, 36(3), 345–398.
- Latombe, J.-C. (1986). Configuration space formulation of planning. Lecture Notes in Control and Information Sciences, 96, 246–254.
- Murray, R. M., Li, Z., & Sastry, S. S. (1994). A Mathematical Introduction to Robotic Manipulation. CRC Press (esp. Chapters 2–3 on rigid body motions and configuration spaces).
- Bullo, F., & Lewis, A. D. (2004). Geometric Control of Mechanical Systems. Springer (configuration manifolds and mechanical systems).
- Park, J., & Chung, W. K. (2005). Geometric integration on Euclidean group with application to articulated multibody systems. IEEE Transactions on Robotics, 21(5), 850–863.