Week 9 — Advanced Motion Planning Day 7 of 7 | Summary & Preview


What We Covered This Week

DayTopicCore Skill
1C-space & obstaclesMap workspace obstacles to configuration space
2Search-based planningUse A* and Hybrid A* for grid/lattice planning
3Sampling-based planningBuild RRT/RRT* trees for high-DOF arms
4Trajectory optimizationSmooth and optimize paths with CHOMP/TrajOpt
5Kinodynamic planningRespect velocity, acceleration, and torque limits
6Python practiceImplement RRT* for a 2-DOF arm from scratch

Key Formulas Cheat Sheet

A* Evaluation Function

$$f(n) = g(n) + h(n)$$ Where $g(n)$ = cost from start, $h(n)$ = heuristic estimate to goal. Requires $h(n)$ admissible (never overestimates) for optimality.

RRT* Rewiring Radius

$$r = \gamma \left( \frac{\log n}{n} \right)^{1/d}$$ Where $n$ = tree size, $d$ = C-space dimension, $\gamma$ = tuning constant.

CHOMP Smoothness Cost (Finite Difference)

$$U_{smooth}(Q) = \sum_{i=2}^{N-1} | q_{i-1} - 2q_i + q_{i+1} |^2$$

TOPP Path Parameterization

$$\dot{s}{max}(s) = \min_i \frac{\dot{q}{max,i}}{|dq_i/ds|}$$ Maximum feasible speed along a geometric path given velocity limits.


Common Pitfalls (Learned the Hard Way)

PitfallWhy It HappensFix
RRT fails near narrow passagesRandom sampling rarely lands in tight gapsUse bridge sampling (sample near obstacles) or informed RRT* (focus search on ellipsoidal subset)
Trajectory optimization collidesSoft penalty allows slight penetrationPost-process with exact collision check; inflate obstacles by safety margin
Hybrid A produces jerky paths*Discretization in $(x, y, \theta)$ cellsSmooth with cubic splines or run TrajOpt as post-processor
Kinodynamic RRT is too slowDynamics integration per edge is expensivePrecompute motion primitives (lattice planning) or use GPU batch simulation
A heuristic overestimates*Euclidean distance × inflation factorUse weighted A* ($w > 1$) deliberately, or scale heuristic back to guarantee admissibility

Algorithm Selection Guide

ScenarioRecommended PlannerWhy
2D grid navigation (warehouse)A* with Manhattan heuristicComplete, optimal, fast
Autonomous vehicle (car)Hybrid A* + TrajOptRespects Ackermann steering, smooth output
6-DOF industrial arm (pick-and-place)RRT* + CHOMPHandles high-D C-space, smooths trajectory
Multi-query in fixed environmentPRM + lazy collision checkingBuild once, query many
Time-critical dynamic environmentsRRT (standard)Fastest sampling planner; replan every 100 ms
Maximum speed along known pathTOPPComputes optimal velocity profile in O(n)

Week 9 → Week 10 Bridge

Week 9 taught you how to move a robot from A to B without collisions.

Week 10 will teach you how to interact with the environment:

DayTopic
1Grasp fundamentals — contact models, force closure, stability
2Grasp planning — antipodal grasps, grasp quality metrics
3Pick-and-place pipeline — perception, planning, grasp, motion
4In-hand manipulation — regrasping, pivoting, sliding
5Dual-arm coordination — bimanual manipulation
6Python practice: Grasp a block with a 2-DOF gripper in PyBullet
7Week 10 summary

Exercise Before Week 10

Challenge: Extend the Week 9 Day 6 RRT* planner with a trajectory smoother:

  1. After RRT* returns a path $[q_1, q_2, \dots, q_N]$, apply CHOMP-style gradient descent: $$q_i \leftarrow q_i - \alpha (q_{i-1} - 2q_i + q_{i+1})$$
  2. Run 100 iterations of smoothing.
  3. Verify the smoothed path remains collision-free.
  4. Plot the path length before and after smoothing — expect 15–40% reduction.

Hint: The discrete Laplacian $q_{i-1} - 2q_i + q_{i+1}$ is the curvature penalty. Larger $\alpha$ = more smoothing, but may push the path into obstacles. Clamp each step with collision checking.


End of Week 9. See you in Week 10 — Grasping and Manipulation!