Trajectory Planning:
The Mathematics of Motion
An autonomous system is only as good as its motion planner. Poor trajectory generation leads to jerky movements, spilled payloads, and destroyed actuators.
1. Paths vs. Trajectories
A path is a purely geometric description of the route a robot must take (e.g., a circle, a line). It contains no timing information. A trajectory is a path parameterized by time. It dictates not just where the robot goes, but when it arrives, implying specific velocities and accelerations.
2. Velocity Profiling
Actuators have limits. A typical movement uses a Trapezoidal Velocity Profile:
- Phase 1: Acceleration. The velocity ramps up linearly to the maximum speed.
- Phase 2: Cruise. The robot travels at a constant maximum velocity.
- Phase 3: Deceleration. The velocity ramps down linearly to zero as it reaches the target.
3. The Problem with Jerk
While trapezoidal profiles are simple, they have instant changes in acceleration at the transitions between phases. The derivative of acceleration is Jerk. Infinite jerk stresses mechanical components. To fix this, modern robotics uses S-Curve velocity profiles, which smooth out the acceleration using Quintic (5th degree) polynomial splines.
❓ Trajectory Planning FAQ
What is the difference between Joint Space and Task Space trajectory planning?
Task Space: Planning happens in the 3D Cartesian world (X, Y, Z). This ensures the end-effector moves in a straight line, but requires calculating Inverse Kinematics at every time step, which is computationally heavy.
Joint Space: Inverse Kinematics is only calculated at the waypoints. The trajectory is then planned purely using motor angles. It's faster and avoids kinematic singularities mid-movement, but the end-effector path might be curved in the real world.
Why are splines used in robotics?
Splines are piece-wise polynomials used to connect waypoints smoothly. They allow us to specify boundary conditions (like ensuring velocity is exactly zero at the start and end of a movement) while ensuring mathematical continuity throughout the path, preventing robotic jitter.