Class TrajectoryInterpolater
- java.lang.Object
-
- com.lightningrobotics.common.auto.trajectory.TrajectoryInterpolater
-
public final class TrajectoryInterpolater extends java.lang.Object
Class used to parameterize a trajectory by time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TrajectoryInterpolater.TrajectoryGenerationException
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Trajectory
timeParameterizeTrajectory(java.util.List<edu.wpi.first.math.spline.PoseWithCurvature> points, java.util.List<TrajectoryConstraint> constraints, double startVelocityMetersPerSecond, double endVelocityMetersPerSecond, double maxVelocityMetersPerSecond, double maxAccelerationMetersPerSecondSq, boolean reversed)
Parameterize the trajectory by time.
-
-
-
Method Detail
-
timeParameterizeTrajectory
public static Trajectory timeParameterizeTrajectory(java.util.List<edu.wpi.first.math.spline.PoseWithCurvature> points, java.util.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.
-
-