MotionProfileGenerator

Motion profile generator with arbitrary start and end motion states and either dynamic constraints or jerk limiting.

Properties

Link copied to clipboard
public final static MotionProfileGenerator INSTANCE

Functions

Link copied to clipboard
public final static MotionProfile generateMotionProfile(MotionState start, MotionState goal, VelocityConstraint velocityConstraint, AccelerationConstraint accelerationConstraint)
public final static MotionProfile generateMotionProfile(MotionState start, MotionState goal, VelocityConstraint velocityConstraint, AccelerationConstraint accelerationConstraint, Double resolution)

Generates a motion profile with dynamic maximum velocity and acceleration. Uses the algorithm described in section 3.2 of Sprunk2008.pdf. Warning: Profiles may be generated incorrectly if the endpoint velocity/acceleration values preclude the obedience of the motion constraints. To protect against this, verify the continuity of the generated profile or keep the start and goal velocities at 0.

Link copied to clipboard
public final static MotionProfile generateSimpleMotionProfile(MotionState start, MotionState goal, Double maxVel, Double maxAccel)
public final static MotionProfile generateSimpleMotionProfile(MotionState start, MotionState goal, Double maxVel, Double maxAccel, Double maxJerk)
public final static MotionProfile generateSimpleMotionProfile(MotionState start, MotionState goal, Double maxVel, Double maxAccel, Double maxJerk, Boolean overshoot)

Generates a simple motion profile with constant maxVel, maxAccel, and maxJerk. If maxJerk is zero, an acceleration-limited profile will be generated instead of a jerk-limited one. If constraints can't be obeyed, there are two possible fallbacks: If overshoot is true, then two profiles will be concatenated (the first one overshoots the goal and the second one reverses back to reach the goal). Otherwise, the highest order constraint (e.g., max jerk for jerk-limited profiles) is repeatedly violated until the goal is achieved.