Robotics and Mechanisms
Robots, mechanisms and characters are simulated as articulated bodies in reduced coordinates: a tree of links whose state is the joint positions and velocities, so joints can never drift apart, stretch or explode under large mass ratios.
Methods
- Featherstone dynamics in double precision: the composite rigid body algorithm (CRBA), recursive Newton–Euler (RNEA) and the articulated body algorithm (ABA); Jacobians, gravity compensation, energies.
- Implicit, effort-limited PD drives, so arbitrarily stiff position targets stay stable.
- Joint limits, velocity limits, joint friction and frictional contacts solved together in joint space.
- Contacts with the whole scene: links collide with every rigid body, mesh and height field, and push dynamic bodies.
- Inverse kinematics for poses and multiple foot targets; URDF import with meshes.
In Divooka
Planned. The factory-robot and mechanical-parts scenes in the plan need it.
Validation
| Test | Result |
|---|---|
| Single pendulum period | error 5.6e-6 |
| Inverse dynamics against forward dynamics, random states | round trip within 2.1e-12 |
| Implicit PD step with stiffness up to 1e9 | no overshoot |
| Box on a slope, μ = 0.5, 35° | 1.6088 m/s after 1 s, equal to g(sin θ − μ cos θ)t |
| Quadruped standing | ground reaction equals the weight to 4e-8 |
| IK on 6-DOF pose targets | position error at most 7.7e-6 m |
| IK with drives under gravity, simulated | end-effector error 0.0022 mm after 3 s |
Cost
Well under a millisecond per frame for an arm or a quadruped.
Limits
- Trees only: closed loops (four-bar linkages, parallel robots) need rigid-world joints.
- Contacts use a dense solver: hundreds of contacts are fine, thousands are slow.
- Semi-implicit integration drifts in energy at O(h) for conservative systems.
Sample scenes
robot-arm, quadruped.