TrajectoryParameterizer

class wpimath.trajectory.TrajectoryParameterizer

Bases: pybind11_object

Class used to parameterize a trajectory by time.

static timeParameterizeTrajectory(points: List[Tuple[wpimath.geometry._geometry.Pose2d, radians_per_meter]], constraints: List[wpimath._controls._controls.constraint.TrajectoryConstraint], startVelocity: meters_per_second, endVelocity: meters_per_second, maxVelocity: meters_per_second, maxAcceleration: meters_per_second_squared, reversed: bool) wpimath._controls._controls.trajectory.Trajectory

Parameterize the trajectory by time. This is where the velocity profile is generated.

The derivation of the algorithm used can be found here: <http://www2.informatik.uni-freiburg.de/~lau/students/Sprunk2008.pdf>

Parameters:
  • points – Reference to the spline points.

  • constraints – A vector of various velocity and acceleration constraints.

  • startVelocity – The start velocity for the trajectory.

  • endVelocity – The end velocity for the trajectory.

  • maxVelocity – The max velocity for the trajectory.

  • maxAcceleration – The max acceleration for the trajectory.

  • reversed – Whether the robot should move backwards. Note that the robot will still move from a -> b -> … -> z as defined in the waypoints.

Returns:

The trajectory.