TrajectoryParameterizer
- class wpimath.TrajectoryParameterizer
Bases:
pybind11_objectClass used to parameterize a trajectory by time.
- static timeParameterizeTrajectory(points: collections.abc.Sequence[tuple[wpimath._wpimath.Pose2d, wpimath.units.radians_per_meter]], constraints: collections.abc.Sequence[wpimath._wpimath.TrajectoryConstraint], startVelocity: wpimath.units.meters_per_second, endVelocity: wpimath.units.meters_per_second, maxVelocity: wpimath.units.meters_per_second, maxAcceleration: wpimath.units.meters_per_second_squared, reversed: bool) wpimath._wpimath.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.