Technical reference

All model documents · source: docs/models/kinematics.md

Robot kinematics: forward kinematics and Jacobians

DexVantage poses a robot's links with two separate engines:

The validation suite (validation/checks_kinematics.py, model id kinematics) compares the two engines with each other and with closed forms written from the makers' published DH tables.

Forward kinematics by the product of exponentials

For a link whose path from the root crosses the moving joints 1 … k, the space-form product of exponentials (Lynch and Park 2017, chapter 4) is

T_link(q) = e^[S_1]θ_1 · e^[S_2]θ_2 · … · e^[S_k]θ_k · M_link

where:

The exponential of a twist, written out in exp_twist:

e^[ω]θ = I + sin θ [ω] + (1 − cos θ) [ω]²                                     (Rodrigues)
e^[S]θ = [[e^[ω]θ, (I θ + (1 − cos θ)[ω] + (θ − sin θ)[ω]²) v], [0, 1]]       (|ω| = 1)
e^[S]θ = [[I, v θ], [0, 1]]                                                  (ω = 0)

The tree is handled by keeping one running product per body. A body's product is its parent's product times the exponentials of the body's own joints, in file order.

Jacobian

The space Jacobian (Lynch and Park 2017, chapter 5) has one twist column per joint on the link's path, and zero columns for the other joints:

J_s = [S_1, Ad(e^[S_1]θ_1) S_2, …, Ad(e^[S_1]θ_1 ⋯ e^[S_{k−1}]θ_{k−1}) S_k],   Ad(R, p) = [[R, 0], [[p]R, R]]

PoEChain.jacobian(q, link, point) returns the world-frame [linear; angular] Jacobian of a point x fixed in the link. Its linear rows are v_s + ω_s × x. This is the same convention as RobotModel.jacobian. PoEChain.space_jacobian returns the raw twists [ω; v].

File conventions the reader implements

Format Element Convention
URDF <origin xyz rpy> R = Rz(yaw) Ry(pitch) Rx(roll): roll, pitch, yaw about the fixed x, y, z axes
URDF <axis xyz> in the joint (child) frame, default (1, 0, 0), normalised
URDF joint types revolute and continuous turn; prismatic slides; fixed does not move; floating is held at identity
MJCF quat (w, x, y, z), normalised
MJCF angles degrees unless <compiler angle="radian"> (euler, axisangle, hinge ref)
MJCF euler eulerseq (default xyz): a lowercase letter turns about the moving axis (post-multiplied), an uppercase letter about the fixed axis (pre-multiplied)
MJCF xyaxes y is orthogonalised against x, and z = x × y
MJCF zaxis the shortest rotation that takes (0, 0, 1) to the vector
MJCF <joint pos axis ref type> the attribute, else the element's class, else the nearest childclass, else main, with class inheritance
MJCF <frame> composes with the bodies and joints inside it
MJCF <include> resolved from the stored files through the import manifest
MJCF ball and free joints held at the home keyframe's qpos, or at their zero
MJCF unnamed bodies and joints named body_<n> and joint_<n> with MuJoCo's index

DH tables used by the checks

The UR5e and Panda models in the checks are written into the check from these tables, as MJCF and URDF. They do not use any downloaded robot model.

UR5e, standard DH. Source: Universal Robots, "DH Parameters for calculations of kinematics and dynamics", UR5e/UR7e table, https://www.universal-robots.com/articles/ur/application-installation/dh-parameters-for-calculations-of-kinematics-and-dynamics/, read 2026-11-06. The link transform is A_i = Rz(θ_i) Tz(d_i) Tx(a_i) Rx(α_i) (Denavit and Hartenberg 1955, as Spong et al. 2006 write it).

Joint a (m) d (m) α (rad)
1 0 0.1625 π/2
2 −0.425 0 0
3 −0.3922 0 0
4 0 0.1333 π/2
5 0 0.0997 −π/2
6 0 0.0996 0

Franka Panda, modified DH (Craig's convention). Source: Franka Emika, "Robot and interface specifications", "Denavit–Hartenberg parameters" for "the Panda's kinematic chain".

The link transform is ^{i−1}T_i = Rx(α) Tx(a) Rz(θ_i) Tz(d) (Craig 2005).

Row a (m) d (m) α (rad) θ
Joint 1 0 0.333 0 θ1
Joint 2 0 0 −π/2 θ2
Joint 3 0 0.316 π/2 θ3
Joint 4 0.0825 0 π/2 θ4
Joint 5 −0.0825 0.384 −π/2 θ5
Joint 6 0 0 π/2 θ6
Joint 7 0.088 0 π/2 θ7
Flange 0 0.107 0 0

The flanges at q = 0, from the sums of these lengths:

The tests check both.

Validation

All checks below use the suite's default seed. Measured on 2026-11-06 with MuJoCo 3.17.0, NumPy 2.5.4 and Python 3.14.4.

Check Reference Tolerance Measured
kinematics.fk_poe_mujoco PoEChain against MuJoCo. 200 random q per robot, every link, five built-in robots plus the project's robots (with no project given, the two samples) 1e-9 m, 1e-9 rad 8.7e-15 m, 3.1e-15 rad (worst on the UR5e + 2F-85 sample; the five built-in robots alone 2.4e-15 m)
kinematics.dh_ur5e Standard DH product against both engines, on the UR5e as MJCF and as URDF. Frames 1–6, 200 random q 1e-9 m, 1e-9 rad 5.6e-16 m, 9.4e-16 rad
kinematics.dh_panda Modified DH product against both engines, on the Panda as URDF. Frames 1–7 and the flange, 200 random q 1e-9 m, 1e-9 rad 6.3e-16 m, 1.1e-15 rad
kinematics.jacobian_fd PoEChain.jacobian against central differences (h = 1e-6) of PoEChain.fk. Every link, 10 q per robot 1e-7 4.4e-10
kinematics.jacobian_mujoco PoEChain.jacobian against MuJoCo mj_jac, at every link's origin and at a random point fixed in the link (up to 0.2 m out on each axis). 40 q per robot 1e-9 8.8e-15
kinematics.fk_pinocchio Pinocchio FK against both engines, on the DH URDFs 1e-9 m, 1e-9 rad registered only when pinocchio is installed; it was not in this run

Why these tolerances.

Robots in the checks. The built-in robots are:

The check also compares every robot in the project. A robot the independent reader cannot read is listed under not_compared, not counted as a pass.

Known limits