TrajectoryParameterizer
- class wpimath.TrajectoryParameterizer
Bases:
pybind11_objectClass used to parameterize a spline trajectory by time.
- static time_parameterize_trajectory(points: collections.abc.Sequence[tuple[wpimath._wpimath.Pose2d, wpimath.units.radians_per_meter]], constraints: collections.abc.Sequence[wpimath._wpimath.TrajectoryConstraint], start_velocity: wpimath.units.meters_per_second, end_velocity: wpimath.units.meters_per_second, max_velocity: wpimath.units.meters_per_second, max_acceleration: wpimath.units.meters_per_second_squared, reversed: bool) wpimath._wpimath.DrivetrainSplineTrajectory
Parameterize the spline 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.
start_velocity – The start velocity for the trajectory.
end_velocity – The end velocity for the trajectory.
max_velocity – The max velocity for the trajectory.
max_acceleration – 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 spline trajectory.