Tools & simulation · topic G2 · 45 hours
MoveIt 2 & the arm control stack
Almost all of «planning + collision + execution» for robot arms lives in this stack. Without MoveIt 2 there is not much to talk about in an arm-related interview; with it, you can get an unfamiliar arm moving in two days.
What to learn
- SRDF is the per-robot configuration: planning group, virtual joint (attaching the arm to world or base), disable collision, passive joint, end-effector link
- Planning plugins and their division of labor: OMPL (RRTConnect default, fast but random), Pilz (industrial lines/arcs, predictable), CHOMP/STOMP (optimization-based, smoother paths but slower)
- IK plugins: KDL is slow and often fails, TRAC-IK is markedly more reliable, ikfast is fast but painful to generate; four out of ten planning failures are unsolvable IK, not a bad planner
- Planning Scene: collision objects, octomap live obstacles, allowed collision matrix (adjacent links must be allowed)
- Controllers: joint_trajectory_controller, MoveIt Servo (teleoperation and visual servoing), GripperCommand for grippers
- Time parameterization: TOTG is smooth but sensitive to acceleration limits, Iterative is more conservative; the limits you declare in parameters must match what the drivers actually deliver
- Engineering details: joint velocity blow-up near singularities, multi-solution jumps, trajectory execution timeouts (the controller's goal_time tolerance)
The lesson · plain words
MoveIt 2 is the «full suite» for arm motion planning: kinematics, collision checking, sampling planners, Cartesian planning, execution. The right way to learn it is not memorizing APIs — it is understanding which decisions it makes for you.
Sampling planning: the RRT intuition
High-dimensional spaces (6/7 DOF) cannot be exhaustively searched; RRT's answer is random sampling while growing a tree step by step: throw a sample, find the nearest node on the tree, extend a small step toward it, keep it if collision-free. Watch the figure: the gray tree «grows» over, and once it hits the goal you trace back the path.
The price: crooked paths. The standard post-processing is Shortcut (random pruning to straighten) + time parameterization (B4's trapezoidal/S curves). MoveIt's default OMPL family is all variants of this one idea.
Interactive figure · drag it and see
Collision checking: the cost center of planning
Every «small step» must be checked for collision: arm vs environment (the scene) and arm vs itself. The FCL engine + acceleration structure (BVH) gets a single check under a millisecond — but thousands of samples still make collision checking the bulk of planning time.
Engineering points: maintain the scene with an octomap/point cloud and downsample periodically; the self-collision matrix (SRDF) excludes link pairs that cannot touch; set the safety distance (padding) to 2–5 cm — too small and it grazes edges, too large and it cannot fit through narrow gaps.
Cartesian planning and its Achilles heel
Sampling planning cannot produce Cartesian constraints like a «straight weld seam». Cartesian planning (Descartes/MoveIt Cartesion) solves IK point by point directly in joint space — the problem: no solution when passing through a singularity.
The engineering combo: OMPL for the long haul, switch to Cartesian near the target; route around singularities or use damped least squares (B2). Pipeline orchestration matters more than any single algorithm — MoveIt's task composer exists precisely for this.
How deep to go
Run «given goal pose → plan → execute» through the Motion Planning Pipeline; explain the OMPL vs Cartesian trade-off; tune padding and planning timeout and know the consequences. With that, MoveIt is your tool, not a black box.
Three questions — do you really get it?
1. What is the core reason RRT works in high dimensions?
- ARandom sampling avoids exhaustive search under the curse of dimensionality
- BIt computes fast
- CIt finds the shortest path
Show answer
A. Probabilistically complete: enough samples will find a solution (if one exists), and each sample costs almost nothing.
2. What does a sampling planner's output path usually need?
- AShortcut straightening + time parameterization before execution
- BDirect execution
- CRe-planning from scratch
Show answer
A. RRT paths are twisted and carry no timing information. Post-processing is standard, not optional.
3. Why is collision checking the bulk of planning time?
- AEvery sampled extension needs a collision check, and there are thousands of samples
- BThe algorithm is complex
- CMemory is insufficient
Show answer
A. N samples × a collision check each. Optimization directions: exclude impossible pairs, simplify the scene.
Keep going deeper
Links without a marker stay on this site; the rest point to the Chinese edition until its translation batch lands.
How it fails in the field
- Planning succeeds against RViz's fake controller, then times out on the real one — the trajectory's velocity/acceleration limits are 3× what the drives can do
- Not editing the allowed collision matrix, so adjacent links are in eternal self-collision: 0% planning success rate while you suspect the model is wrong
- Using Cartesian straight lines across a singularity: joint velocities instantly hit their limits and the protective stops keep tripping
You have learned enough when
The Chinese edition carries the full topic page for MoveIt 2 & the arm control stack, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/G2/.