Package edu.wpi.first.math.trajectory
Class TrajectoryParameterizer
java.lang.Object
edu.wpi.first.math.trajectory.TrajectoryParameterizer
Class used to parameterize a trajectory by time.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception for trajectory generation failure. -
Method Summary
Modifier and TypeMethodDescriptionstatic Trajectory
timeParameterizeTrajectory
(List<PoseWithCurvature> points, List<TrajectoryConstraint> constraints, double startVelocityMetersPerSecond, double endVelocityMetersPerSecond, double maxVelocityMetersPerSecond, double maxAccelerationMetersPerSecondSq, boolean reversed) Parameterize the trajectory by time.
-
Method Details
-
timeParameterizeTrajectory
public static Trajectory timeParameterizeTrajectory(List<PoseWithCurvature> points, List<TrajectoryConstraint> constraints, double startVelocityMetersPerSecond, double endVelocityMetersPerSecond, double maxVelocityMetersPerSecond, double maxAccelerationMetersPerSecondSq, boolean reversed) Parameterize the trajectory by time. This is where the velocity profile is generated.The derivation of the algorithm used can be found here.
- Parameters:
points
- Reference to the spline points.constraints
- A vector of various velocity and acceleration. constraints.startVelocityMetersPerSecond
- The start velocity for the trajectory.endVelocityMetersPerSecond
- The end velocity for the trajectory.maxVelocityMetersPerSecond
- The max velocity for the trajectory.maxAccelerationMetersPerSecondSq
- 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.
-