Class TrajectoryParameterizer


public final class TrajectoryParameterizer
extends Object
Class used to parameterize a 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.

      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.
      The trajectory.