Skip to the content
FixTheRobot Explore Robotics / Manipulator Basics / Labs / Lab 10

Manipulator Basics · Lab 10 of 10

Lab 10: Motion Planning and Collision Avoidance

Add obstacles, see configuration space, plan with RRT or RRT*, smooth the path and execute it collision-free.

Objective

Plan collision-free motions for a planar arm: place obstacles, see the configuration-space obstacles they create, plan with RRT or RRT* in configuration space, smooth and validate the path, execute it, and compare with direct interpolation.

Brief theory

A configuration qq is valid when the whole robot is inside its joint limits and no link touches an obstacle or another link. The set of valid configurations is the free configuration space Cfree\mathcal{C}_{\mathrm{free}}. Obstacles that are simple shapes in the workspace become curved regions in configuration space: the 2R view draws them exactly by checking every cell of a grid of (q1,q2)(q_1, q_2).

RRT grows a tree from the start: sample a random configuration, extend the nearest node towards it by at most one step, and keep the new node only if it and the segment to it are valid. RRT* also chooses the cheapest nearby parent and rewires neighbours, so the path keeps getting shorter. Every segment is checked at a fine resolution and the whole robot is checked, not just the tool. See Module 13.

Simulation workspace

Drag in the view where the controls say you can. Every number shown is computed live by the simulation engine running in your browser.

Loading the simulation…

Guided tasks

Each task ticks itself when the simulation sees you do it. Progress is saved in this browser.

  1. Select start and goal configurationsSet the start and the goal (sliders or "Set from arm").
  2. Introduce obstaclesAdd or move an obstacle.
  3. Plan a collision-free pathRun RRT or RRT* until it finds a path.
  4. Observe rejected configurationsTurn on "Show rejected samples" after planning.
  5. Execute the pathExecute the planned path and watch the arm move without touching anything.
  6. Compare direct interpolation with collision-aware planningPress "Check direct interpolation" to see where the straight joint-space move collides.

Challenges

Each challenge states an objective, its constraints and how success is measured. The live line under it is computed from the simulation. Hints and full solutions are there when you want them.

Success criteria

  • The executed path is validated segment by segment at 0.01 rad resolution against the whole robot.
  • Direct interpolation is shown to collide (its first colliding configuration is drawn) when the planner was needed.

Explanation of the results

A straight line in joint space is usually not a straight line for the tool, and a straight line for the tool can force joints through limits or links through obstacles. The planner sidesteps both by searching where validity is defined: configuration space. The rejected samples (red) outline the configuration-space obstacles the planner bumped into.

RRT paths are jagged because the tree grows randomly; shortcut smoothing removes detours by trying direct connections between path points and keeping only those that are still valid. The validation step re-checks the final path at a finer resolution than planning used: a path is only accepted if that check passes. Sampling planners are probabilistically complete: they find a path if one exists, given enough samples, but cannot prove that none exists.