Companion to the Hugging Face Robotics Course · Unit 2  ·  Unit 1 · Datasets →  ·  Workbench →

Arm Playground

Robot kinematics and control on the course's two-joint arm. Task space shows where the hand is. Configuration space maps every pair of joint angles (θ₁, θ₂) as one pixel. Follow the lesson on each tab, or just play. Tab 5 gives the real arm its other joints back, in 3D.

What do the symbols mean? Tap one to see it on screen.

Task space · where the hand is

Configuration space · (θ₁, θ₂)

free hits floor hits shelf past elbow limit hover = preview · click = go there

The real arm · SO‑101, drawn from its URDF

Two flat views · side and top

where the wrist can go with the lift and elbow inside their limits dashed: tab 1's ring (l₁ + l₂ outside, the elbow's stop inside) the pan's range
What's exact here, and what's a model
  • Exact to the robot's description file: joint order, axes, offsets and limits are the SO‑101 URDF's (TheRobotStudio/SO‑ARM100, so101_new_calib.urdf at commit 385e8d7, Apache‑2.0). A copy sits in this repo, and npm test checks this tab's joint table against it number for number.
  • Exact math: forward kinematics, the 116 mm and 135 mm links, the Jacobian (checked against finite differences), and the count 5 < 6.
  • A model: the arm is drawn as plain rods through the joint centres, not the printed parts, and the base and shadows are just for depth. The grid is the plane z = 0 of the URDF's base frame; how that sits against a real tabletop depends on the printed base, which isn't drawn. The dots are random joint settings, not the workspace's true edge, and they ignore the arm hitting itself.
  • The solver is numerical. When it converges it is within 0.1 mm of the target. It only searches downhill from where it starts, so it can also stop against a joint limit; that is why Solve tries several starting poses before it says a target is out of reach, and why Follow can stall on a target behind the base.
  • Also a model: a URDF is an idealised arm. A built one has play in its gears and bends a little, and its calibrated limits differ slightly. The gripper's jaw is left out.
  • Units: tabs 1–4 use two links of length 1. This tab is in millimetres, with the real 116 : 135. With the wrist roll at 0 the fingertip sits 18.3 mm to one side of the blue sheet (10 to 26 mm as the roll turns), because the gripper is offset back toward the arm's centreline. The side view looks straight along the joint axes, so that offset doesn't show there.

Lesson ·

More experiments for free play

    The math, live

    Controls


    Tick a joint to unlock it. A locked joint is what tabs 1–4 assumed. Slider ranges are the URDF's joint limits in whole degrees (the elbow's ±96.8° shows as ±96°).


    The green target appears when you solve or follow. Drag it in the 3D view (it slides in the screen's plane) or, more precisely, in either flat view. On a phone, use the flat views: put your finger on the target.

    Drag in the task pane to move the green target.

    Iterative IK starts from the current pose and steps downhill on ‖p(q) − p*‖² using the damped Jacobian. It ignores obstacles, just like a bare solver.

    Drag in the task pane to set the desired hand velocity ṗ* (green arrow).

    Teleop: hold the pad or ←↑→↓ / WASD to drive the hand. Diff-IK converts each command into joint speeds.

    Tracking error |Δp| over the last 10 s. Grey dashed curve = the ideal continuous response D·e−kpt after each step; the gap between it and the red line is what discrete updates, latency and the speed limit cost you.