Trajectory Smoothing and Time Parameterization
If you send a raw A* or RRT waypoint list straight to a robot's motors, the machine will shudder, slam into corners, and sound like it's shaking its own bolts loose. A geometric path only tells you where to go — not when to be there or how smoothly to accelerate.
Core ideas covered in this module
- Cubic & quintic splines
- Trapezoidal & S-curve velocity profiles
- Velocity, acceleration & jerk bounds
From geometric breadcrumbs to time-stamped motion
Think about driving to a grocery store. Knowing the turn-by-turn street route is a path. Deciding to ease onto the gas, cruise at 35 mph, and feather the brake before the red light is a trajectory — a path parameterized by time, q(t).
Real actuators cannot teleport from zero speed to full speed in zero seconds (infinite acceleration), and gearboxes hate instantaneous jumps in acceleration (infinite jerk). Every motion controller needs smooth time profiles that stay inside hardware limits.
Trapezoidal ramps vs. minimum-jerk splines
Two classic velocity profiles show up on nearly every conveyor, CNC machine, and robot arm:
- Trapezoidal velocity profile: accelerate at full +a_max up to v_max, cruise flat, then brake at −a_max. It finishes the move as fast as possible for given (v_max, a_max), or collapses into a triangle on short moves — at the cost of sharp corners in velocity (infinite jerk spikes).
- Minimum-jerk (quintic) polynomial: fits a 5th-degree curve q(t) with zero velocity and zero acceleration at both start and finish. Velocity becomes a smooth bell curve, acceleration rises and falls gently, and jerk stays continuous and bounded.
Interactive lab
Trajectory Spline & Velocity Profile Tuner
marimo· LiveTrading milliseconds for mechanical kindness
Look closely at the total duration T when you toggle modes under the same v_max and a_max bounds. The trapezoidal profile always gets there slightly faster because it spends time pinned right at the hardware ceiling.
The quintic minimum-jerk profile takes a bit longer, yet it dramatically cuts vibration, prevents drinks from sloshing on a tray, and reduces wear on belts and harmonic drives. When chaining multiple waypoints together, cubic or quintic splines keep velocity and acceleration continuous across every intermediate corner so the arm glides instead of stopping and starting at every dot.
Quintic minimum-jerk time scaling
q(τ) = q₀ + Δq · (10τ³ − 15τ⁴ + 6τ⁵), τ = t / T ∈ [0, 1]
This unique 5th-degree polynomial satisfies zero velocity and zero acceleration at τ = 0 and τ = 1 while minimizing the integral of squared jerk ∫ j(t)² dt over the move.
Suppose you command a short 0.3 m move with a high v_max = 3.0 m/s and moderate a_max = 1.5 m/s². What happens to a trapezoidal velocity profile?
Industrial arms and diffusion/VLA action-chunking policies alike rely on smooth trajectory execution: libraries like Ruckig compute jerk-limited S-curve profiles online in microseconds, while robot controllers interpolate policy waypoints at 100–1000 Hz.
Hands-On Python Notebook
05 · Trajectory Smoothing & Time Parameterization
Generate trapezoidal and quintic minimum-jerk trajectories and inspect position, velocity, acceleration, and jerk limits.
Try this on your own inside the notebook
- Compute the triangular velocity limit when distance is too short for cruise speed
- Chain two cubic spline segments with continuous velocity at the via-point
In Google Colab, use File → Save a copy in Drive to keep your own edits and notes. Or download the files directly:
uvx marimo edit --sandbox notebooks/course-3/05_trajectory_smoothing_time_parameterization.pyWrap up this module
Saved automatically in your browser profile so you can pick up right where you left off.