Skip to the content
FixTheRobot Explore Robotics / Manipulator Basics / Labs / Lab 07

Manipulator Basics · Lab 07 of 10

Lab 07: Trajectory Planning

Generate linear, cubic, quintic and trapezoidal trajectories in joint and Cartesian space and execute them.

Objective

Generate smooth motions between two configurations with linear, cubic, quintic and trapezoidal profiles, in joint space and as straight Cartesian lines, compare their velocity and acceleration, respect limits, and execute them on the arm.

Brief theory

A trajectory is a path plus timing. For one joint moving from q0q_0 to qfq_f in time TT at rest at both ends, the cubic

Rest-to-rest cubic
q(t)=q0+3 Δ t2T2−2 Δ t3T3,Δ=qf−q0q(t) = q_0 + 3\,\Delta\,\tfrac{t^2}{T^2} - 2\,\Delta\,\tfrac{t^3}{T^3},\qquad \Delta = q_f - q_0
Peak velocity 1.5 Δ/T, peak acceleration 6 Δ/T², with a jump in acceleration at both ends.

matches position and velocity; the quintic also matches acceleration, so the acceleration starts and ends at zero (peak velocity 1.875 Δ/T1.875\,\Delta/T, peak acceleration 5.77 Δ/T25.77\,\Delta/T^2). A trapezoidal profile accelerates at a constant rate, cruises, then decelerates; it is time-optimal for given velocity and acceleration limits. Joint-space trajectories move every joint smoothly but the tool follows a curve; Cartesian trajectories move the tool along a line but need IK at every sample and can hit singularities or limits. See Module 10.

Simulation workspace

Drag in the view where the controls say you can. Every number shown is computed live by the simulation engine running in your browser.

Loading the simulation…

Guided tasks

Each task ticks itself when the simulation sees you do it. Progress is saved in this browser.

  1. Generate a trajectoryChoose a profile and press Generate.
  2. Compare cubic and quintic profilesGenerate a cubic, then a quintic with "Keep previous for comparison" on, and compare the acceleration plots.
  3. Change the durationGenerate the same move with a different duration T and see the peaks scale.
  4. Observe velocity and acceleration limitsMake the move fast enough to exceed a limit (the plot marks it), then use "Shortest time within limits".
  5. Execute the trajectory in the simulationPress Execute and watch the arm follow it.

Challenges

Each challenge states an objective, its constraints and how success is measured. The live line under it is computed from the simulation. Hints and full solutions are there when you want them.

Success criteria

  • The plotted profiles start and end at the boundary values you set (shown numerically under the plots).
  • The "within limits" duration produces peaks at or just below the limits you set.

Explanation of the results

Halving TT doubles the peak velocity and quadruples the peak acceleration: every polynomial profile scales as Δ/T\Delta/T and Δ/T2\Delta/T^2. The cubic’s acceleration jumps from 0 to 6Δ/T26\Delta/T^2 at the start; real motors cannot change torque instantly, so that jump excites vibration. The quintic avoids it at the cost of a slightly higher peak velocity.

In joint space the tool path bends because each joint interpolates independently; in Cartesian mode the tool goes straight but the joint motion is whatever IK requires, and near the edge of the workspace (or across it) the requirement can become impossible: the planner then reports the first sample where the line leaves the reachable set, hits a joint limit or would make the joints jump.