CrackRobotics

Trajectory Generation

Take over the timing that move_joints and move_to did for you. Generate setpoint streams from polynomials and velocity profiles, respect joint limits, synchronise joints and pass through waypoints without stopping.

Start the lesson0/5 steps done

What you'll learn

Before you start

You should be comfortable with basic Python: variables, loops and functions. We'll introduce the robotics and the maths as you go. The first visit downloads the physics engine and Python, about 20 MB, and later visits load from your browser's cache.

Steps

  1. 1Cubic trajectoriesStream your own setpoints: fit a cubic to four boundary conditions and drive the arm through three moves.Boundary conditionsCubic polynomialsSetpoint streamingOpen
  2. 2Smooth accelerationAdd two more boundary conditions to get a quintic: no jolt at the start or end of a move.Quintic polynomialsAcceleration continuityJerkPro
  3. 3Velocity and acceleration limitsTurn joint limits into the fastest legal move: accelerate, cruise, brake.Trapezoidal velocityTime-optimal motionTriangular profilesPro
  4. 4Moving all joints togetherScale one shared profile so every joint starts and stops together, as fast as the slowest joint allows.Multi-axis synchronisationScalingJoint-space straight linesPro
  5. 5Through waypoints without stoppingGive every waypoint a velocity and join them with cubic Hermite segments, so the arm flows through.Via pointsSplinesVelocity continuityPro
  6. ★Bonus: Fastest legal pickRace the red ball into the cup without ever breaking a joint's speed or acceleration limit.Time-optimal motionLimits over a whole taskSettlingPro