ROBOTICS 101Concept explainer

Trajectory Generation: Polynomials and Splines

A path says where to go. A trajectory also says when, which fixes the speed and acceleration at every moment. Joining waypoints with straight lines gives sudden jumps in velocity. Polynomial splines join them smoothly, and the smoother the joins, the gentler the motion is on the motors and the payload.

Drag the waypoints.

Polynomial segments

A cubic spline uses a third-order polynomial between each pair of waypoints and matches position, velocity, and acceleration where they join. A quintic segment from rest to rest has the minimum-jerk shape, with \(s = t / T\):

$$x(t) = x_0 + (x_1 - x_0)\left(10 s^3 - 15 s^4 + 6 s^5\right)$$

Jerk is the rate of change of acceleration. Low jerk means less vibration and less wear.

What to notice

Straight segments have constant speed on each leg, but the speed changes instantly at each waypoint, so the acceleration and jerk spike, which in reality means a shudder or an impossible demand. The cubic spline passes through every waypoint with continuous velocity and acceleration, so it flows through them. The quintic segments are the gentlest on each leg but stop at every waypoint. Robot arms use exactly these tools to turn planned paths into motor commands.