Kinematic Trees and Robot Description Formats
In Course 1, every robot we drew was a single line of links connected end to end. The moment I opened my first real quadruped model, that mental picture broke: a torso doesn't lead to one tip — it branches out into four legs, each with three joints of its own, plus sensors bolted onto the nose and back.
Core ideas covered in this module
- Branched kinematic trees
- URDF & MJCF XML structure
- Joint origins, axes, and limits
From single chains to branching trees
Think of a family tree or a folder directory on your laptop. You start at one root folder — usually the robot's torso or base chassis — and branch outward. Every branch splits cleanly into child folders, and no folder ever loops back to become its own parent.
In robotics software, that branching hierarchy is called a kinematic tree. A humanoid torso branches into two arms, two legs, and a head; a mobile manipulator branches from a wheeled base into an arm, a gripper, and an overhead camera mast. Why no loops? Because a tree guarantees that every piece of the robot has one unique path back to the root, so forward kinematics stays fast and unambiguous.
Reading URDF and MJCF without getting lost in XML
When you load a robot into ROS, MuJoCo, Isaac, or Drake, it almost always arrives as an XML description file — either URDF (Unified Robot Description Format) or MuJoCo's MJCF. Both files look verbose at first, yet they only really say two things over and over:
- Links (`<link>` in URDF, `<body>` in MJCF): the rigid physical parts — a shin, a forearm, a camera housing — carrying mass, inertia, visual shape, and collision shape.
- Joints (`<joint>`): the moving connections tying one parent link to one child link, specifying the joint type (`revolute`, `continuous`, `prismatic`, or `fixed`), the 3D `<origin>` offset where the hinge sits, the spin `<axis>`, and safe `<limit>` bounds.
Interactive lab
URDF & Collision Capsule Inspector
Three.js· Live<robot name="planar_manipulator">
<link name="base_link">
<visual><geometry><mesh filename="meshes/base.stl"/></geometry></visual>
<collision><geometry><box size="0.18 0.18 0.12"/></geometry></collision>
</link>
<joint name="shoulder_pitch" type="revolute">
<parent link="base_link"/>
<child link="upper_arm"/>
<origin xyz="0 0 0.12" rpy="0 0 0"/>
<axis xyz="0 1 0"/>
<limit lower="-2.40" upper="2.40" effort="85" velocity="3.2"/>
</joint>
<link name="upper_arm">
<visual><geometry><mesh filename="meshes/upper_arm.obj"/></geometry></visual>
<collision>
<origin xyz="0.210 0 0" rpy="0 1.5708 0"/>
<geometry><cylinder length="0.42" radius="0.055"/></geometry>
</collision>
</link>
<joint name="elbow_pitch" type="revolute">
<parent link="upper_arm"/>
<child link="forearm"/>
<origin xyz="0.42 0 0" rpy="0 0 0"/>
<limit lower="-2.60" upper="2.60" effort="55" velocity="4.0"/>
</joint>
<link name="forearm">
<collision>
<origin xyz="0.180 0 0" rpy="0 1.5708 0"/>
<geometry><cylinder length="0.36" radius="0.055"/></geometry>
</collision>
</link>
</robot>Why origin offsets and joint limits save hardware
Notice in the XML snippet how `<origin xyz="..." rpy="..."/>` places the child joint at the far tip of its parent link. Get one sign or meter-vs-millimeter scale wrong in that origin tag and a robot dog's knees will spawn floating three meters behind its hips.
Joint `<limit lower="..." upper="..." effort="..." velocity="..."/>` attributes matter just as much. Real servos hit mechanical hard stops and cables twist until they snap. Encoding those physical bounds right in the robot description lets planners and reinforcement learning policies respect hardware limits from day one.
Parent-to-child transform along a tree edge
T_parent←child(q) = T_origin(xyz, rpy) · T_joint(axis, q)
Each joint in a URDF or MJCF file combines one fixed mounting offset (where the bracket sits on the parent) with one variable motion along the joint axis.
In a standard URDF kinematic tree for a quadruped robot, which parent-child relationship is valid?
MJCF is increasingly popular in GPU-accelerated RL because it natively supports closed-loop tendons, contact friction parameters, and nested `<body>` tags, whereas URDF remains the universal exchange format across ROS and CAD exporters.
Hands-On Python Notebook
01 · Kinematic Trees & URDF Parsing Lab
Parse branched URDF XML descriptions in Python, inspect parent-child joint limits, and compute link poses across an articulated arm or quadruped leg.
Try this on your own inside the notebook
- Add a second quadruped leg branch to the URDF tree and verify its foot pose
- Enforce joint angle limits during forward kinematics traversal
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-2/01_kinematic_trees_urdf.pyWrap up this module
Saved automatically in your browser profile so you can pick up right where you left off.