RobotGuide

Robotics core · topic B4 · 25 hours

Trajectory planning

From «where to go» to «how to get there». Sampling planners (RRT) and optimization planners (CHOMP/TrajOpt) are the two main lines.

Core stage · Intermediate
Algorithm · Proficient System software · Hands-on Embedded & controls · Aware Mechanical · Aware

What to learn

The lesson · plain words

Planning is «which road from A to B»; a trajectory is «where on that road at every millisecond». The robot never executes a path — it executes a curve with time stamped on it, because motors have maximum acceleration and gearboxes have maximum jerk.

This page makes everything clear with a single curve: the velocity profile. Its shape decides whether the robot is gentle or violent.

Trapezoidal velocity: fastest, but with hard corners

Accelerate to the limit, cruise, then decelerate: the velocity curve is a trapezoid. Total time is minimal; the price is that acceleration jumps instantly at the corners — jerk, the derivative of acceleration, is theoretically infinite.

Infinite jerk on real hardware is one solid thump: the gearbox clacks, the tip shudders, the workpiece wobbles. Invisible at low speed; turn the speed up and it all surfaces.

Interactive figure · drag it and see

What this figure shows: two velocity profiles for the same move — gray dashed is trapezoidal, orange is a smooth S-curve; dragging the acceleration slider rescales both. Takeaway: with the same peak acceleration the smooth curve costs only about 10–20% more time but turns infinite jerk into a finite one — and the faster the move, the smaller that time penalty becomes.

Smooth curves: pay a little time, skip the thump

Make acceleration itself continuous (cosine, S-curve, polynomial) and the corners of the velocity curve get rounded. Same peak acceleration, 10–20% more total time, but jerk drops from infinite to finite.

In the figure above, gray is trapezoid, orange is smooth. Drag the acceleration slider larger and the time gap between the two shrinks — the faster the move, the cheaper being smooth is. High-speed applications should use smooth profiles.

Joint space or Cartesian space

Joint-space interpolation: each joint walks from its own start to its own end. Simple, never hits limit stops, never crosses singularities. The catch: the tip traces an arc, not a straight line.

Cartesian straight lines: the tip walks a true line — the weld seam looks right. The price: the path may cross singularities or exceed joint limits. The field-proven recipe is joint space for the long haul, then a Cartesian line for the final approach.

Obstacles and time-optimality

With obstacles in the scene, the planner first finds a collision-free path (sampling, RRT, or grid search), then assigns time onto that path. Two separate steps, because doing both at once is too expensive.

Time-optimal trajectories ride the torque limit — sounds beautiful, but any disturbance saturates the actuators. The common engineering compromise is «time-optimal × 0.8», saving strength for surprises.

Three questions — do you really get it?

1. The biggest problem of the trapezoidal velocity profile?

  • AAcceleration jumps at the corners — jerk is infinite
  • BTotal time is too long
  • CThe tip cannot follow a straight line
Show answer

A. A step in acceleration means infinite jerk — on hardware, a thump and vibration. The higher the speed and payload, the worse it shows.

2. Why are smooth velocity profiles recommended especially at high speed?

  • ASmooth profiles are more accurate
  • BThey cannot be used at low speed
  • CThe time penalty of smoothness is relatively smaller at high speed
Show answer

C. The smooth segments' duration depends on the acceleration limit, not the cruise speed; the longer the cruise, the smaller smoothness' share of total time.

3. The tip must trace a strict straight line — which space do you plan in?

  • AJoint-space interpolation
  • BCartesian-space interpolation
  • CThe two are fully equivalent
Show answer

B. Joint-space interpolation arcs the tip. A straight line must be interpolated directly in Cartesian space — with singularity and limit checks.

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

You have learned enough when

You can compare polynomial versus spline continuity, explain why joint-space and Cartesian planning produce different paths, and state the price of RRT*'s asymptotic optimality.

The Chinese edition carries the full topic page for Trajectory planning, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/B4/.