Rigid-Body Equations of Motion
Once a robot has two or more joints swinging together, each joint stops living in its own tidy bubble. Bending your elbow changes how heavy your shoulder feels; spinning your waist flings your outstretched hand outward. The rigid-body manipulator equation looks intimidating at first glance, yet every single symbol in it corresponds to a physical push you can feel yourself.
Core ideas covered in this module
- M(q)q̈ + C(q,q̇)q̇ + g(q) = τ
- Configuration-dependent inertia
- Coriolis & centrifugal coupling
Reading M(q)q̈ + C(q,q̇)q̇ + g(q) = τ in plain English
Think of this famous equation as an accountant's ledger for joint torque τ. On the right side is the torque your motors actually deliver. On the left side are the three physical jobs that torque has to pay for:
- M(q)q̈ — Inertia torque: accelerating the links. Notice M depends on q (the pose)! When an elbow stretches straight out, the shoulder's effective inertia M₁₁ spikes compared to when the elbow is tucked tight against the chest.
- C(q,q̇)q̇ — Velocity coupling (Coriolis & centrifugal): forces that appear only when joints are already moving (q̇ ≠ 0). Spin around on an office chair and pull your arms inward: as inertia drops, you speed up — that's the same coupling.
- g(q) — Gravity torque: the static load required just to keep the links from falling at the current pose q, even when velocity and acceleration are zero.
Why M(q) changes mid-reach
When you tuck a heavy dumbbell tight against your shoulder, swinging your upper arm left and right feels quick and snappy. Extend your elbow straight out, and suddenly your shoulder has to move that same weight on a much longer radius.
Even on a 1-link arm, sliding a motor or payload closer to vs. farther from the shoulder changes M(q) dramatically. On a multi-link arm, bending the elbow literally moves the forearm's mass closer to or farther from the shoulder axis in real time.
Interactive lab
Mass & Rotational Inertia Slider Lab
MuJoCo WASM· LiveForward dynamics vs. inverse dynamics
Depending on which side of the equals sign you already know, the exact same equation runs in two opposite directions:
In inverse dynamics, you have a desired trajectory (q, q̇, q̈) and plug it into the left-hand side to solve immediately for the motor torques τ needed to pull it off. In forward dynamics — what physics engines like MuJoCo or Isaac Sim run at every timestep — you know the motor torques τ, invert M(q), and solve for the resulting joint accelerations q̈ to step the simulation forward.
The manipulator equation of motion
M(q) q̈ + C(q, q̇) q̇ + g(q) = τ
Total motor torque τ pays for accelerating pose-dependent inertia M(q)q̈, handling moving-frame centrifugal/Coriolis forces C(q,q̇)q̇, and holding up gravity g(q).
A robot arm is holding completely still (q̇ = 0 and q̈ = 0) straight out to the side. Which terms in M(q)q̈ + C(q,q̇)q̇ + g(q) = τ are nonzero?
Fast C++ rigid-body libraries like Pinocchio and MuJoCo compute inverse dynamics (RNEA) and forward dynamics (ABA) in microseconds, letting whole-body controllers and RL environments evaluate full multi-joint physics inside tight control loops.
Hands-On Python Notebook
04 · Manipulator Dynamics: M(q), C(q,q̇) & g(q)
Evaluate each term of the 2-link manipulator equations of motion and visualize how shoulder inertia changes as the elbow bends.
Try this on your own inside the notebook
- Plot shoulder effective inertia M₁₁(θ₂) from folded to straight-arm poses
- Verify energy conservation during a zero-friction, zero-torque swing
In Google Colab, use File → Save a copy in Drive to keep your own edits and notes. Or download the files directly:
uvx marimo edit --sandbox notebooks/course-4/04_rigid_body_equations_of_motion.pyWrap up this module
Saved automatically in your browser profile so you can pick up right where you left off.