Principle:Google deepmind Mujoco Forward Dynamics
| Knowledge Sources | |
|---|---|
| Domains | Physics_Simulation, Rigid_Body_Dynamics, Robotics |
| Last Updated | 2026-02-15 06:00 GMT |
Overview
Computational pipeline that evaluates all derived quantities (positions, velocities, forces, contacts) from the current generalized state without advancing time.
Description
Forward Dynamics computes the full state of the physics simulation given current positions and velocities. Unlike mj_step which also integrates forward in time, mj_forward only evaluates derived quantities: Cartesian positions from joint angles (forward kinematics), velocities, actuator forces, collision detection, constraint forces, and accelerations. This is the computational core shared by both stepping and visualization.
The pipeline follows MuJoCo's staged computation model: position-dependent → velocity-dependent → actuation → acceleration → constraint solving.
Usage
Use this principle when you need to compute the full simulation state without advancing time. Common use cases include: initial state computation after setting qpos/qvel, visualization updates, and evaluating the dynamics at a specific state for control or learning.
Theoretical Basis
The forward dynamics pipeline computes:
Where:
- is the joint-space inertia matrix
- is the bias force (Coriolis, gravity, springs)
- is the applied generalized force (actuators)
- is the constraint force mapped to joint space
The pipeline stages are:
- Position: Forward kinematics, collision detection, composite inertias
- Velocity: Coriolis/centrifugal forces, damping
- Actuation: Actuator forces from control signals
- Acceleration: Unconstrained acceleration
- Constraint: Contact and equality constraint solving (PGS/CG/Newton)