Robot Cook: RRT in an N-dimensional configuration space
The short-order cook's arm, with as many links as you like. Every task is about where the
tool tip is (the batter bowl, a spot on the griddle, a plate, the tool rack), so the
kitchen never changes — but the configuration space has one dimension per link.
With two links the right panel is the whole C-space. With more, it is a 2-D slice
through the current configuration: θ1 across, one other joint up, the rest
held where they are. The tree is drawn projected onto that slice, so it can look like it
cuts through obstacles: that is what the shadow of a 4-D tree looks like.
Step joints:keys: arrows step the two shown joints, j next joint, p plan, s RRT*/RRT, t tool, e tree, c clear trace, r reset · drag the tool tip on the station (inverse kinematics) or the dot on the C-space
ready
What to look for
Same kitchen, bigger space. Switch from 2 to 4 links and plan to the same goal. The station
looks the same; the planner is now searching a 4-D box, and the slice on the right is only one
2-D cut of it (press j to cut along a different joint).
Rejection sampling gets harder. The stats line reports how much of the C-space box is
collision free and how much of it reaches the goal. Both shrink with the number of links:
a longer chain has more ways to hit something, and a uniform sample rarely lands the tip on a
small goal. That is why plans to the tool rack take longer with six links.
RRT* needs a radius that fits the dimension. The two-link rewire radius (30°) holds
no second node in a 4-D box, so RRT* would quietly behave like RRT. The radius here scales
with the dimension (see the stats line); compare path costs between RRT and RRT*.
Redundancy helps. "Behind guard R" is unreachable for the two-link arm and reachable
with four or more: the chain threads the gap in the splash guard and bends sideways.
The Python original is robotCook.py --links N in the motion planning assignment
(arm: nLinkArm.py, planner: rrt.py); this page ports the arm, the kitchen's
obstacles and the planner line for line, so what the tree does here is what it does there.