ProjekinAja. Robotics Stage 2 · Kinematics Lesson 2.8
● Stage 2 · Lesson 2.8

Trajectory Parameterization: Profiles, Splines, and Jerk

A trajectory that ignores jerk limits will make the robot vibrate, excite resonances, and shake sensors that need to be still.

⏱ ~22 min read 📐 Motion geometry 🔧 ROS 2 / rclpy

🎯 By the end you'll understand

The difference between a path and a trajectory, and why parameterization is the step that adds timing. How trapezoidal velocity profiles are derived from kinematic constraints — not assumed from a lookup table. Why cubic splines guarantee continuity through C², and why that is not always enough. What jerk is and why it degrades IMU readings, excites structural resonances, and wears gearboxes prematurely. The minimum-time trajectory as a constrained optimization. The failure mode of assigning constant-speed time parameterization to an arc-length path — and exactly where it produces velocity discontinuities.

KEY INSIGHTA path says where; a trajectory says when

Every smooth geometric path through waypoints can be turned into an infinite family of trajectories — each obeying the same shape, but arriving at each point at a completely different time. Choosing badly from that family is what breaks motors, blurs images, and makes IMU readings useless.

When you plan a path for FollowBot — a Bezier arc through a doorway, a cubic spline around an obstacle — you have specified geometry: a sequence of positions in space. You have said nothing about speed. The trajectory is what you get when you assign a time to every point on that path. A bad time assignment can make a mechanically feasible path kinematically infeasible: it can demand velocities the motors cannot sustain, accelerations the chassis cannot withstand, or jerk levels that shake the IMU into uselessness.

🔑 Hold onto this

Trajectory parameterization is the mapping q(t): from time t to robot configuration q. The path is just the image set of q(t) — the shape. The trajectory includes the timing law. Every constraint violation in motion execution (velocity limit exceeded, acceleration spike, sensor vibration) originates in a bad parameterization, not a bad path. Fix the path planner all you want — if you time-parameterize with a naive constant speed, you will still violate constraints at waypoints.

CORE CONCEPTTime vs. arc-length parameterization — and the critical failure

A path through waypoints P₀, P₁, P₂ can be described in two natural ways:

Arc-length parameterization describes position as a function of distance traveled along the path: q(s) where s is the arc length from the start. This is a pure geometric description. The speed at which s advances through time is unspecified. Arc-length parameterization is geometrically clean — it decouples shape from speed — but it says nothing about timing.

Time parameterization adds a timing law s(t), turning the arc-length path into a trajectory q(s(t)). The velocity is then q̇ = (dq/ds)·ṡ, and the acceleration is q̈ = (dq/ds)·s̈ + (d²q/ds²)·ṡ². Every constraint — maximum speed, maximum acceleration, maximum jerk — is a constraint on ṡ, s̈, and the third derivative s⃛.

⚠ The constant-speed failure

The most common naive approach: parameterize by assigning constant arc-length speed ṡ = v_const between every pair of waypoints. This produces a velocity profile that is constant within each segment but has an instantaneous direction change at each waypoint — because the path direction (dq/ds) changes discontinuously even though ṡ does not. The result: velocity direction discontinuity at waypoints, which in physical terms means the velocity command jumps to a new direction instantaneously. This demands infinite acceleration — always above the hardware limit — and produces the jerky, lurching motion that triggers velocity limit protection in motor drivers. The robot doesn't follow the path; it stops-and-starts at every waypoint.

Naive: constant arc-length speed ⚡ direction jump ⚡ direction jump P₀ P₃ velocity discontinuity → infinite accel demand Smooth: jerk-limited profile P₀ P₃ C² continuity — velocity & accel match at waypoints
Left: naive constant arc-length speed. Velocity magnitude is constant, but direction changes instantaneously at each waypoint — demanding infinite acceleration. Right: a smooth spline trajectory with jerk-limited profiling. Velocity tangents align continuously through waypoints.

The key quantity at a waypoint is the boundary condition on velocity. A properly parameterized trajectory specifies not just position but velocity and acceleration at each waypoint — so that the transition between segments is smooth. This is precisely what spline theory delivers.

HOW IT WORKSTrapezoidal velocity profiles: derived from constraints

The simplest smooth profile is trapezoidal: ramp velocity up at maximum acceleration a_max, cruise at maximum velocity v_max, then ramp down at -a_max. Do not treat this as a lookup table — derive it from the kinematic constraints so you understand when it fails.

Given a move of total arc length d with limits v_max and a_max, the profile has three phases:

1

Ramp-up: duration t₁ = v_max / a_max, distance d₁ = v_max² / (2·a_max)

Velocity increases linearly: v(t) = a_max · t. This phase ends when velocity hits v_max. The distance covered is d₁ = ½ · a_max · t₁² = v_max² / (2·a_max). If d < 2·d₁ (the distance is too short to reach v_max), the profile is triangular, not trapezoidal: you must solve v_peak = √(a_max · d) and re-derive t₁ and t₂.

2

Cruise: duration t₂ = (d − 2·d₁) / v_max, constant velocity

Only exists when d ≥ 2·d₁. The cruise phase covers the remaining distance at v_max. Duration is the remaining distance divided by v_max. If your distance is small or your acceleration is low (d₁ is large), there is no cruise phase and the profile degenerates to triangular.

3

Ramp-down: symmetric to ramp-up, ending with zero velocity

Decelerate at -a_max from v_max to zero over distance d₁. Total move time: T = 2·t₁ + t₂. Position is obtained by integrating the velocity profile: q(t) is piecewise quadratic in the ramp phases and linear in the cruise phase. The position profile has C¹ continuity (velocity is continuous) but C⁰ discontinuity in acceleration at the three phase transitions — there are instantaneous changes in acceleration at t=0, t=t₁, t=t₁+t₂, and t=T. Those acceleration steps are jerk impulses.

💡 The triangular degenerate case is common and often missed

For FollowBot following a person at typical indoor speeds (0.5–1.2 m/s), inter-waypoint distances are often 0.3–0.8 m. With a_max = 0.5 m/s² and v_max = 1.0 m/s, the ramp-up distance is d₁ = 1.0 m. That is already larger than the inter-waypoint spacing — every segment is triangular. A trajectory generator that assumes trapezoidal and never checks for the degenerate case will produce incorrect profiles for every real-world segment it encounters.

The trapezoidal profile has a critical structural problem: its acceleration profile is a rectangle — constant a_max, then a step to zero (or to -a_max). That step in acceleration is a jerk impulse — instantaneous, infinite jerk. For a real mechanical system, this excites structural resonances and produces sharp vibration transients. That is why trapezoidal profiles are good enough for slow industrial systems but problematic for sensor-bearing mobile robots.

CORE CONCEPTCubic and quintic splines: continuity guarantees

A spline is a piecewise polynomial that is constrained to be smooth at the joints between pieces. The degree of the polynomial determines the highest derivative you can control at each joint.

Spline type Polynomial degree Free parameters per segment Continuity at joints What you can specify at endpoints
Cubic34 (a, b, c, d)C² — position, velocity, acceleration matchPosition + velocity (2 per endpoint = 4 total ✓)
Quintic56 (a–f)C² per-segment (endpoint BCs only); C⁴ at interior nodes requires a global spline solve matching jerk and snap across segmentsPosition + velocity + acceleration (3 per endpoint = 6 total ✓)
Trapezoidal2 (piecewise)3 phasesC¹ — velocity continuous, accel has jumpsPosition + max speed + max accel

Cubic spline derivation. A cubic polynomial for a segment from t=0 to t=T has the form q(t) = a·t³ + b·t² + c·t + d. The four boundary conditions — q(0) = q₀, q(T) = q₁, q̇(0) = v₀, q̇(T) = v₁ — uniquely determine a, b, c, d:

cubic_spline.pycubic segment — derive coefficients
def cubic_coeffs(q0, q1, v0, v1, T):
    # q(t) = a*t^3 + b*t^2 + c*t + d, t in [0, T]
    d = q0
    c = v0
    b = (3*(q1 - q0) - T*(2*v0 + v1)) / T**2
    a = (2*(q0 - q1) + T*(v0 + v1))   / T**3
    return a, b, c, d

def cubic_eval(a, b, c, d, t):
    return a*t**3 + b*t**2 + c*t + d

def cubic_vel(a, b, c, t):
    return 3*a*t**2 + 2*b*t + c

def cubic_accel(a, b, t):
    return 6*a*t + 2*b   # linear — jerk is constant 6*a

Notice that the acceleration is linear in t, which means the jerk (d³q/dt³) is constant (= 6a) within each cubic segment. The jerk is not zero — it is a constant nonzero value for the duration of the segment. At segment boundaries, jerk can still be discontinuous (jump from 6a_prev to 6a_next). Cubic splines guarantee C² — they do not guarantee bounded jerk.

Quintic spline adds acceleration boundary conditions: q̈(0) = acc₀ and q̈(T) = acc₁. Now six conditions determine six coefficients, and the jerk profile within each segment is quadratic rather than constant. Per-segment quintic with position/velocity/acceleration BCs at endpoints guarantees C² continuity locally. Achieving C⁴ (matching jerk and snap across all interior nodes) requires a global spline solve — not achievable from per-segment BCs alone. Quintic splines are the standard choice for high-performance robot arms where sensor vibration and gearbox wear matter.

📖 C² vs. C⁴ continuity in physical terms

C² continuity (cubic spline) means: position, velocity, and acceleration match at each waypoint. To a sensor on the robot, this is smooth — no acceleration jumps. But jerk can still jump at each waypoint, which means the force on the structure changes instantaneously. For FollowBot's IMU, a jerk discontinuity produces a brief spike in the accelerometer output. If the IMU is inside the EKF update loop, that spike propagates into the pose estimate as a momentary corruption. Quintic splines (C⁴) additionally match jerk and snap at waypoints, eliminating those spikes.

HOW IT WORKSWhy jerk matters: resonances, sensors, and hardware life

Jerk is the rate of change of acceleration: j(t) = d³q/dt³, measured in m/s³ (for linear motion) or rad/s³ (for angular motion). It receives far less attention than velocity and acceleration in introductory robotics, but it has three distinct failure mechanisms:

1

Structural resonance excitation

Every mechanical structure has natural frequencies — the frequencies at which it vibrates most readily when excited. A jerk impulse (instantaneous change in acceleration) is a broadband excitation: it injects energy across all frequencies simultaneously. If any natural frequency of the chassis, arm linkage, or sensor mount falls in that band, the structure resonates. For a robot arm, this manifests as tool-tip oscillation after a fast move; for FollowBot's base, it manifests as camera and LIDAR vibration that blurs point clouds and corrupts depth estimates for the duration of the ringdown (typically 100–500 ms depending on damping).

2

IMU corruption during the jerk event

FollowBot's IMU measures linear acceleration and angular rate. The accelerometer output during a jerk event reflects both the intended motion and the superimposed structural vibration. The EKF receives a measurement that is the sum of "robot accelerating as planned" and "chassis vibrating at 35 Hz." The EKF's measurement model assumes the latter does not exist; it will treat the spike as real acceleration and update the pose estimate incorrectly. The resulting pose error is proportional to the jerk magnitude and the sensor-to-node distance. Jerk-limited trajectories directly protect EKF accuracy — not as a coincidence but by design.

3

Gearbox wear and current spikes

A jerk event demands that the motor current change at a rate proportional to the jerk magnitude (torque = inertia × acceleration; jerk = d(accel)/dt = d(torque)/dt / inertia). Very high jerk spikes saturate the current controller and produce impact loads in the gearbox teeth. For a differential-drive base running 8 hours a day, the cumulative gear wear from unconstrained jerk can halve gearbox lifetime compared to jerk-limited profiles. This is a real operational cost in deployed mobile robots, not a theoretical concern.

Jerk-limited profiles add a third constraint — j_max (m/s³) — and use an S-curve velocity profile instead of the trapezoidal. An S-curve has seven phases: jerk-up, constant acceleration, jerk-down, cruise, jerk-up (negative), constant deceleration, jerk-down (zero). The result is a smooth "S" shape in the velocity profile with rounded corners where the trapezoidal has sharp ones. The acceleration profile looks like a trapezoid. The jerk profile is a rectangle — bounded, not impulsive.

Trapezoidal profile S-curve (jerk-limited) vel acc jerk jerk impulses at all 4 phase transitions vel acc jerk bounded ±j_max — no impulses
Profile comparison. Left: trapezoidal — jerk is a series of Dirac impulses at phase transitions (red vertical lines), exciting structural resonances. Right: S-curve jerk-limited — jerk is bounded by ±j_max throughout; the velocity profile has smooth rounded corners instead of sharp bends.

SEE ITTrajectory planner: profile, spline, and IMU impact

Place waypoints on the canvas, choose a profile type, adjust kinematic limits, and see how position, velocity, acceleration, and jerk behave over time — plus how the simulated IMU reading (the scalar jerk reaching the IMU) changes with each choice. Constraint violations appear in red. The worst choice: set profile to Trapezoidal with high max velocity and low acceleration — then observe the jerk spikes at phase boundaries and their effect on the IMU noise floor.

⚙ Interactive · Trajectory planner — profile, constraints, and IMU impact

Click the canvas to add waypoints (up to 5). Then adjust profile and limits to see the downstream effects. Red = constraint violated. IMU bar shows peak jerk reaching the sensor each second.

Click canvas to add up to 5 waypoints. Need at least 2 to compute a trajectory.

Simulated IMU jerk reading
Peak jerk at sensor (m/s³) — determines EKF corruption risk
Peak jerk 0.0
RMS jerk 0.0
Add waypoints and select a profile.
Trajectory summary
Total time— Total distance— Peak velocity— Peak accel— Peak jerk— C² violations—
Position (m)
Velocity (m/s)
Acceleration (m/s²)
Jerk (m/s³)

Select a profile and place waypoints to begin.

Notice what happens with Trapezoidal + high v_max + low a_max: the ramp-up distance d₁ = v_max²/(2·a_max) becomes larger than inter-waypoint spacing. The profile degenerates to triangular — it never reaches v_max — and the jerk peaks occur very close together. Switch to Quintic spline: the jerk profile smooths out, the IMU peak drops, and the profile now respects the kinematic constraints you set.

CORE CONCEPTMinimum-time trajectory: the right optimization

Given a path, a set of kinematic constraints (v_max, a_max, j_max), and a start and end at rest, what is the fastest possible trajectory? This is the minimum-time trajectory problem — a constrained optimal control problem.

For the simple case (single axis, start and end at zero velocity), the minimum-time profile is the S-curve described above: maximize acceleration as fast as jerk will allow, hold at a_max until the velocity hits v_max, then mirror the deceleration. This is the well-known "bang-bang" solution for the jerk-constrained case.

For multi-segment paths through multiple waypoints, the problem is harder: you must also optimize the velocity at each intermediate waypoint. Higher waypoint velocity means less time decelerating-and-reaccelerating at that waypoint, but it also demands higher acceleration before the waypoint. The tradeoff is real. The constrained optimization is:

min_time_opt.pyminimum-time waypoint velocity selection
# Minimize total traversal time subject to:
#   |v(t)| <= v_max   at all t
#   |a(t)| <= a_max   at all t
#   |j(t)| <= j_max   at all t
#   q(t_i) = P_i       (waypoints hit exactly)
#
# Decision variables: v_i (velocity at each waypoint i)
# Objective: minimize sum of segment times T_i
#
# Analytic bound: v_i <= v_max_reachable from previous waypoint
#   given distance d_{i-1,i} and a_max:
#   v_i <= sqrt(v_{i-1}^2 + 2*a_max*d_{i-1,i})
#   (this is just kinematics: v^2 = v0^2 + 2*a*d)

def max_reachable_vel(v0, d, a_max, v_max):
    return min(v_max, (v0**2 + 2*a_max*d)**0.5)

# Forward pass: compute max achievable velocity at each waypoint
def forward_pass(distances, v_max, a_max):
    v = [0.0]
    for d in distances:
        v.append(max_reachable_vel(v[-1], d, a_max, v_max))
    return v

# Backward pass: ensure we can decelerate to zero at the end
def backward_pass(v_forward, distances, a_max):
    v = list(v_forward); v[-1] = 0.0
    for i in range(len(v)-2, -1, -1):
        v[i] = min(v[i], max_reachable_vel(v[i+1], distances[i], a_max, float('inf')))
    return v

The forward-backward pass is the core of time-optimal multi-segment planning. It runs in O(N) per dimension, is analytically exact for the trapezoidal case, and requires only one modification for the jerk-constrained case: replace the kinematic reachability formula with the jerk-constrained version (where the effective acceleration is limited by the jerk ramp-up time).

💡 Decoupled vs. coupled multi-axis planning

For a 2D mobile robot, x and y are coupled by the path constraint — you cannot independently time-parameterize each axis. The correct approach is to parameterize along arc length and apply the forward-backward pass to the arc-length speed profile. For a 6-DOF arm, each joint can be treated independently (decoupled planning) or all joints can be synchronized so they all begin and end motion simultaneously (coupled planning). Coupled planning is slower (limited by the slowest joint) but produces smoother end-effector paths. Nav2 uses arc-length parameterization for the mobile base; MoveIt 2 uses joint-space coupled planning for arms.

FOLLOWBOTImplementing trajectory profiles for FollowBot's diff-drive base

In Stage 2's kinematic arc, FollowBot has its differential-drive forward model (2.1), wheel-to-cmd_vel inverse model (2.7), and odometry integration. Trajectory parameterization is the piece that turns a geometric path into a sequence of cmd_vel messages the velocity controller can actually execute without hitting limits.

Here is a minimal jerk-limited cmd_vel publisher for a straight-line move that illustrates the S-curve seven-phase structure:

straight_traj.pyrclpy · jerk-limited straight-line trajectory node
import rclpy
from rclpy.node import Node
from geometry_msgs.msg import Twist
import math

class StraightTraj(Node):
    """Jerk-limited straight-line trajectory publisher.
       Publishes cmd_vel at rate Hz for a move of distance m.
    """
    def __init__(self, distance=1.0, v_max=0.8, a_max=0.5, j_max=2.0, rate=50):
        super().__init__('straight_traj')
        self.pub = self.create_publisher(Twist, '/cmd_vel', 10)
        self.dt = 1.0 / rate
        # S-curve: compute 7-phase durations
        self.profile = self._scurve(distance, v_max, a_max, j_max)
        self.t = 0.0; self.v = 0.0; self.a = 0.0; self.done = False
        self.create_timer(self.dt, self.step)

    def _scurve(self, d, v_max, a_max, j_max):
        # t_j = ramp time to reach a_max at j_max
        t_j = a_max / j_max
        # velocity gained during jerk phase alone
        v_j = 0.5 * j_max * t_j**2
        v_eff = min(v_max, d / (2 * t_j + 1e-9))  # degenerate guard
        t_a = (v_eff - 2*v_j) / a_max  # constant-accel phase; may be 0
        t_a = max(0.0, t_a)
        t_v = (d - (v_eff * (2*t_j + t_a))) / v_eff  # cruise; may be 0
        t_v = max(0.0, t_v)
        return {'t_j': t_j, 't_a': t_a, 't_v': t_v,
                'v_max': v_eff, 'j_max': j_max, 'a_max': a_max}

    def step(self):
        if self.done: return
        p = self.profile; t = self.t
        T1=p['t_j']; T2=T1+p['t_a']; T3=T2+p['t_j']
        T4=T3+p['t_v']; T5=T4+p['t_j']; T6=T5+p['t_a']; T7=T6+p['t_j']
        if t < T1:
            j = p['j_max']
        elif t < T2:
            j = 0.0
        elif t < T3:
            j = -p['j_max']
        elif t < T4:
            j = 0.0
        elif t < T5:
            j = -p['j_max']
        elif t < T6:
            j = 0.0
        elif t <= T7:
            j = p['j_max']
        else:
            self.done = True; self.pub.publish(Twist()); return
        self.a += j * self.dt
        self.a = max(-p['a_max'], min(p['a_max'], self.a))  # clamp
        self.v += self.a * self.dt
        self.v = max(0.0, min(p['v_max'], self.v))
        msg = Twist()
        msg.linear.x = self.v
        self.pub.publish(msg)
        self.t += self.dt

Three things to notice. First, the jerk is selected piecewise from the seven-phase schedule — this is the only deterministic way to guarantee j_max compliance without numerical integration drift. Second, the accumulator for acceleration is clamped at a_max — guard against floating-point error accumulation over 50 Hz ticks. Third, the profile degeneracy check (v_eff guard against division-by-zero) is essential for short moves where the full S-curve cannot fit. The Stage 2 milestone now has: forward model, inverse model, odometry, and trajectory execution from waypoints.

🔑 FollowBot milestone — Stage 2 trajectory layer

With this lesson's trajectory parameterization layer added to the Stage 2 milestone, FollowBot's motion stack is: (1) forward kinematic model (wheel velocities → robot velocity, Lesson 2.1); (2) inverse model (cmd_vel → wheel commands, Lesson 2.7); (3) trajectory parameterization (waypoints + constraints → cmd_vel sequence, this lesson); (4) odometry integration producing /odom. The arm FK and Jacobian (Lesson 2.9) will complete the Stage 2 milestone. The jerk-limited profile is the piece that protects the IMU from vibration corruption — relevant to every EKF update in Stage 4.

WEAKNESSWhere this bites

✗ Arc-length path + constant-time parameterization = velocity discontinuities at waypoints

This is the canonical failure mode from the brief. You have a set of waypoints, a spline interpolating them in arc length, and you time-parameterize by dividing total time equally among segments. Within each segment, the robot moves at a constant arc-length speed. At waypoints, the path direction (dq/ds) changes — but arc-length speed ṡ does not. The velocity vector (v = (dq/ds)·ṡ) therefore changes direction instantaneously at each waypoint. This is a velocity discontinuity — physically, infinite lateral acceleration. The motor driver's velocity limit protection fires, the robot stops at each waypoint, and the resulting motion is the pathological "stop-and-start" gait that every real-world trajectory error looks like before you learn to count derivatives.

✗ Ignoring jerk for sensor-bearing platforms

In industrial robotics applications where the tool is a drill or a welding torch, jerk matters only for gearbox wear. In mobile manipulation — where FollowBot's IMU is inside the EKF update loop — jerk matters because every jerk event corrupts the pose estimate for 100–500 ms of ringdown time. The correlation between jerk events and EKF spikes is empirically obvious in rosbag recordings and analytically predictable from the mechanical resonance model, yet jerk limits are routinely omitted from introductory ROS 2 trajectory planning tutorials. The result: robots that track well in simulation (where no structural resonance exists) and oscillate in pose estimate on real hardware.

✗ Treating C² continuity as "smooth enough" for all cases

Cubic splines guarantee C² — position, velocity, and acceleration match at joints. For most person-following tasks, this is sufficient: the IMU sees no acceleration discontinuities, and jerk within each segment is small (constant, from the linear acceleration profile). But for fast arm motions — FollowBot reaching out to take an object from a person — the cubic spline's constant jerk within each segment is nonzero and can be large if waypoints are close and segment times are short. The quintic spline fixes this by also matching jerk at joints (C⁴), but requires specifying acceleration boundary conditions at each waypoint, which is an additional design burden. The correct choice depends on the platform: cubic for slow mobile base navigation, quintic for arm trajectory execution at high speed.

KEY INSIGHTHow it connects

  • 2.1 · Differential Drive Kinematics: FollowBot's Motion Model — the forward model (wheel velocities → robot velocity) is the execution layer that receives the cmd_vel commands this lesson's trajectory planner generates. A trajectory with jerk discontinuities will stress the controller derived in 2.1.
  • 2.7 · Velocity Control in Practice: cmd_vel to Wheel Commands — the velocity controller that converts cmd_vel to wheel commands operates at 50–200 Hz. Jerk spikes from a trapezoidal profile arrive as velocity command steps that the PID must track — a step input that triggers the integrator and can produce overshoot. The jerk-limited profile protects this controller's performance.
  • 2.9 · Mobile Manipulator Kinematics: When FollowBot Reaches Out — arm trajectory planning requires the same profile machinery derived here, but in joint space (quintic spline with acceleration boundary conditions). The jerk limit protects the arm's gearboxes and the camera mounted on the end-effector from vibration.

Trajectory parameterization is where kinematics meets execution. The path planner in Stage 6 will produce geometric paths; those paths need a timing law before they become executable trajectories. Every constraint — velocity limits from the kinematic model, acceleration limits from the dynamic model (Stage 3), jerk limits from the sensor protection requirement — is encoded in the parameterization step. Getting it right here prevents a class of field failures that is otherwise indistinguishable from "bad planning" or "bad control."

GLOSSARYKey terms introduced

Trajectory parameterization
The mapping q(t) from time to robot configuration. Adds a timing law to a geometric path, transforming it from a set of positions into a time-indexed sequence of positions, velocities, and accelerations. The step where all kinematic constraints are enforced.
Arc-length parameterization
Describing a path as a function of distance traveled along it: q(s). Geometrically clean — decouples shape from speed — but contains no timing information. Requires a separate timing law s(t) to become a trajectory.
Trapezoidal velocity profile
A time-optimal trajectory for a single axis under velocity and acceleration constraints. Three phases: ramp-up at a_max, cruise at v_max, ramp-down at -a_max. Has C¹ continuity; acceleration discontinuities produce jerk impulses at phase boundaries.
S-curve profile (jerk-limited)
A seven-phase trajectory profile that bounds jerk to ±j_max. The velocity profile has smooth "S"-shaped ramps instead of sharp linear ramps. The acceleration profile is trapezoidal. No jerk impulses — ideal for sensor-bearing mobile robots.
Jerk
The third derivative of position with respect to time (d³q/dt³), measured in m/s³ or rad/s³. Physically: the rate of change of acceleration. Unlimited jerk excites structural resonances, corrupts IMU readings, and produces impact loads in gearboxes.
Cubic spline
A piecewise cubic polynomial connecting waypoints with C² continuity — position, velocity, and acceleration match at joints. Determined by specifying position and velocity at each endpoint. Jerk is constant (nonzero) within each segment.
Quintic spline
A piecewise degree-5 polynomial with C⁴ continuity — also matching jerk and snap (4th derivative) at joints. Determined by specifying position, velocity, and acceleration at each endpoint. Standard for high-speed arm trajectory planning where sensor vibration must be minimized.
Forward-backward pass
A linear-time algorithm for minimum-time trajectory planning through multiple waypoints. The forward pass computes the maximum reachable speed at each waypoint given the previous speed and available distance; the backward pass ensures deceleration is feasible to zero at the end. Complexity O(N).

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1What is the difference between a path and a trajectory? Why does parameterizing an arc-length path with constant arc-length speed produce velocity discontinuities at waypoints?›

A path is a geometric object — a set of positions in space, described by q(s) where s is arc length. It says nothing about speed or timing. A trajectory adds a timing law s(t), giving a time-indexed sequence of positions, velocities, and accelerations.

When you assign constant arc-length speed (ṡ = const), the velocity vector is v = (dq/ds)·ṡ. The magnitude |v| = ṡ is constant, but the direction dq/ds (the path tangent) changes at each waypoint when the path bends. A direction change at constant speed means the velocity vector changes instantaneously at each waypoint — this is a velocity discontinuity. Mathematically, it demands infinite lateral acceleration (a = dv/dt → ∞ at the waypoint). Motor drivers and velocity controllers interpret this as a velocity limit violation and react by stopping — producing the stop-and-start motion that is the empirical signature of this failure.

2Derive the ramp-up distance d₁ for a trapezoidal profile and state the condition under which the profile degenerates from trapezoidal to triangular. Why does this matter for FollowBot?›

In the ramp-up phase, acceleration is a_max and the robot starts from rest. Velocity at time t is v(t) = a_max · t. The ramp-up ends at t₁ = v_max / a_max, when velocity reaches v_max. The distance covered is:

d₁ = ∫₀^{t₁} v dt = ½ · a_max · t₁² = ½ · a_max · (v_max/a_max)² = v_max² / (2·a_max)

By symmetry, the ramp-down also covers d₁. Total distance needed for a full trapezoidal profile is 2·d₁. If the segment distance d < 2·d₁, the robot cannot reach v_max — the profile is triangular: the peak velocity is v_peak = √(a_max · d), and there is no cruise phase.

For FollowBot at typical indoor navigation parameters (v_max = 1.0 m/s, a_max = 0.5 m/s²): d₁ = 1.0 m. Inter-waypoint spacing in person-following is often 0.3–0.8 m — smaller than 2·d₁ = 2.0 m for every segment. A trajectory generator that assumes trapezoidal and never checks this condition will compute an incorrect (physically infeasible) profile for every real navigation segment.

3Why do cubic splines guarantee C² continuity but not bounded jerk? What does the jerk look like within a cubic segment and at segment boundaries?›

A cubic segment q(t) = at³ + bt² + ct + d has four boundary conditions (position and velocity at each endpoint) determining four coefficients. The acceleration is q̈(t) = 6at + 2b — a linear function of t. The jerk is q⃛(t) = 6a — a constant for the entire segment. So within each cubic segment, jerk is nonzero and constant (it is 6 times the leading coefficient).

At segment boundaries, the adjacent segments have different leading coefficients a_prev and a_next — so jerk jumps from 6a_prev to 6a_next. This is a jerk discontinuity. The cubic spline's C² guarantee (position, velocity, acceleration match) does not extend to jerk. For slow navigation, the jerk value 6a is usually small. For fast arm motions with close waypoints and short segment times, 6a can be large — a quintic spline or an explicit jerk-bounded parameterization is needed.

4Explain the forward-backward pass for minimum-time multi-segment trajectory planning. What does each pass compute, and why are both passes necessary?›

The forward-backward pass finds the minimum-time waypoint velocity profile for a multi-segment path.

Forward pass: starting from v₀ = 0 (rest), compute the maximum velocity reachable at each waypoint given the previous waypoint's velocity and the distance of the intervening segment. The reachability formula is v_i ≤ min(v_max, √(v_{i-1}² + 2·a_max·d_{i-1,i})). This is just the kinematic identity v² = v₀² + 2·a·d. The forward pass tells you the maximum speed you could arrive at each waypoint if you only cared about accelerating.

Backward pass: starting from v_N = 0 (rest at the end), apply the same formula in reverse to ensure you can decelerate to the required end velocity. For the terminal waypoint, v_N = 0. Working backwards: v_i = min(v_forward[i], √(v_{i+1}² + 2·a_max·d_{i,i+1})). This pass ensures the robot can stop — you may need to arrive at an intermediate waypoint slower than the forward pass allows, because braking for the final stop requires pre-deceleration from further back.

Both passes are necessary because reachability is asymmetric in time: you must be able to reach the waypoint speed from the previous one AND decelerate to the next one from the current one. Omitting the backward pass produces profiles that cannot stop at the end.

Next: mobile manipulator kinematics — when FollowBot reaches out →