| name | robot-trajectory |
| description | Robot trajectory planning — joint-space vs. Cartesian, trapezoidal velocity profile, 5th-degree polynomial, DH parameters, inverse kinematics, singularities, jerk-limited motion, OMPL/MoveIt. |
| metadata | {"priority":7,"promptSignals":{"phrases":["robot trajectory","robot path planning","trapezoidal velocity","robot kinematics","inverse kinematics","DH parameters","robot singularity"],"minScore":3}} |
Robot Trajectory Planning — Complete Skill
Trajectory vs. Path
Path: geometric curve in configuration space (no time info)
Trajectory: path + time parameterization (position, velocity, acceleration vs. time)
Joint-Space vs. Cartesian-Space Planning
Joint-Space Trajectory
Plan each joint independently; q(t) = [q₁(t),...,q_n(t)]
Advantages: singularity avoidance; guaranteed reachable; simple computation
Disadvantages: Cartesian path unpredictable (may arc); poor for straight-line motion requirements
Cartesian-Space Trajectory
Plan X(t) = [x, y, z, roll, pitch, yaw] in task space; use IK at each time step
Advantages: predictable Cartesian path; intuitive for assembly, welding
Disadvantages: singularities along path cause infinite joint velocities; IK may fail
Velocity Profiles
Trapezoidal (Linear with Blended Ramp)
3 phases: acceleration, constant velocity, deceleration
Parameters: q_start, q_end, v_max, a_max
Phase 1 (acceleration):
q(t) = q_start + ½ a_max t² [0 ≤ t ≤ t_b]
v(t) = a_max t; t_b = v_max / a_max
Phase 2 (constant velocity):
q(t) = q_start + q_blend + v_max (t - t_b) [t_b ≤ t ≤ T - t_b]
Phase 3 (deceleration): mirror of phase 1
Total time:
T = Δq / v_max + v_max / a_max [if Δq large enough for full v_max]
If Δq ≤ v_max²/a_max → triangular profile (never reaches v_max):
T = 2√(Δq/a_max)
Limitation: discontinuous acceleration → jerk = ∞ at phase transitions
5th-Degree Polynomial (Smooth)
Satisfies: q(0)=q₀, q(T)=q_f, q̇(0)=v₀, q̇(T)=v_f, q̈(0)=a₀, q̈(T)=a_f
Trajectory:
q(t) = a₀ + a₁t + a₂t² + a₃t³ + a₄t⁴ + a₅t⁵
Coefficients (zero start/end velocity and acceleration):
a₀ = q₀; a₁ = a₂ = 0
a₃ = 10(q_f - q₀)/T³
a₄ = -15(q_f - q₀)/T⁴
a₅ = 6(q_f - q₀)/T⁵
Velocity peak: at t = T/2; v_max = 1.875 × Δq/T
Acceleration: continuous; smooth; no jerk spikes
7th-Degree Polynomial (Jerk-Limited)
Adds continuous jerk: satisfies 8 boundary conditions including jerk = 0 at start/end
Used in high-speed and precision pick-and-place; semiconductor handling
S-curve (Jerk-Limited Trapezoidal)
7 phases: jerk up → accel → jerk down → constant vel → jerk up → decel → jerk down
Parameters: j_max, a_max, v_max
Motion time:
T = v_max/a_max + a_max/j_max + Δq/v_max (rough; depends on distance)
Via Points and Splines
Multiple waypoints: q₀, q₁, ..., q_k (joint angles)
Cubic spline interpolation: smooth connection through all waypoints
Ensure continuous velocity and acceleration at each waypoint
LSPB (Linear Segment with Parabolic Blends):
Linear between waypoints; parabolic blending at each waypoint
Easy to plan; efficient; velocity direction jump at each waypoint
Kinematics
DH (Denavit-Hartenberg) Parameters
4 parameters per joint: θ_i (joint angle), d_i (link offset), a_i (link length), α_i (link twist)
Transformation matrix:
T_{i-1}^i = R_z(θ_i) × T_z(d_i) × T_x(a_i) × R_x(α_i)
Forward kinematics:
T_0^n = T_0^1 × T_1^2 × ... × T_{n-1}^n
Jacobian Matrix
Maps joint velocities to Cartesian velocities:
ẋ = J(q) × q̇ [x = [pos; orientation]; q = joint angles]
Jacobian columns (for revolute joint i):
J_i = [z_{i-1} × (O_n - O_{i-1}); z_{i-1}] [position + rotation parts]
Velocity from Jacobian:
q̇ = J^†(q) × ẋ [J^† = pseudoinverse; J^(-1) for square non-singular]
Inverse Kinematics (IK)
Closed-form (analytical): only for specific architectures (6-DOF with wrist singularity structure)
UR-style: 3 intersecting wrist axes → analytical solution exists
Puma 560: standard analytical IK; 8 solutions (elbow up/down, shoulder left/right, wrist flip)
Numerical (iterative):
Newton-Raphson: q_{k+1} = q_k + J^† × (x_d - x(q_k))
Gradient descent; Levenberg-Marquardt (for least-squares, handles overdetermined)
Damped Least Squares (Wampler):
q̇ = J^T(J J^T + λ²I)^(-1) × ẋ
λ = damping factor; prevents large q̇ near singularities
Singularities
Condition: J loses rank → J J^T singular → infinite q̇ for bounded ẋ
Manipulability measure: w = √det(J J^T) → 0 at singularity
Types (6-DOF anthropomorphic):
Shoulder singularity: wrist center on shoulder axis
Elbow singularity: arm fully extended or folded
Wrist singularity: joints 4 and 6 aligned → joint 5 loses DOF
Singularity detection: condition number of J; or w < threshold
Singularity avoidance: plan path away from singularity; use damped Jacobian near singularity
Motion Planning (Collision Avoidance)
Configuration Space (C-space)
Map obstacles in Cartesian to C-space (forbidden q regions)
Complete planning in C-space: in theory; exponential complexity
Sampling-Based Planners (OMPL — Open Motion Planning Library)
RRT (Rapidly-exploring Random Tree): grow tree from start; sample random q; extend toward sample
RRT:* asymptotically optimal; rewire tree for shorter paths
PRM (Probabilistic Roadmap Method): pre-build roadmap; query with graph search
MoveIt! (ROS): integrates OMPL; motion planning for 6-DOF arms; collision checking with FCL
CHOMP (Covariant Hamiltonian Optimization): gradient descent on trajectory; minimizes trajectory cost including obstacle avoidance
Time-Optimal Planning
Find T* = minimum time to traverse path subject to joint velocity and acceleration limits
Bobrow/Shiller/Pfeiffer-Kiefer algorithm:
- Trace path; at each s, find max and min motor torques
- Compute velocity-acceleration phase plane
- Maximum velocity curve (MVC) from torque limits
- Switch curve from MVC → time-optimal trajectory
Output
Provide: trajectory parameterization (polynomial degree or profile type), joint angle q(t) [°] and velocity q̇(t) [°/s] at key time steps, Cartesian position X(t) [mm] and velocity Ẋ(t) [mm/s], peak velocity [°/s or mm/s], peak acceleration [°/s² or mm/s²], singularity check (manipulability w along path), IK solution set (up to 8 for 6-DOF), motion planner (RRT/RRT*/PRM), estimated cycle time T [s], and collision clearance from obstacle [mm].