WPILibC++  2020.3.2-60-g3011ebe
frc::TrajectoryParameterizer Class Reference

Class used to parameterize a trajectory by time. More...

#include <TrajectoryParameterizer.h>

Public Types

using PoseWithCurvature = std::pair< Pose2d, units::curvature_t >
 

Static Public Member Functions

static Trajectory TimeParameterizeTrajectory (const std::vector< PoseWithCurvature > &points, const std::vector< std::unique_ptr< TrajectoryConstraint >> &constraints, units::meters_per_second_t startVelocity, units::meters_per_second_t endVelocity, units::meters_per_second_t maxVelocity, units::meters_per_second_squared_t maxAcceleration, bool reversed)
 Parameterize the trajectory by time. More...
 

Detailed Description

Class used to parameterize a trajectory by time.

Member Function Documentation

◆ TimeParameterizeTrajectory()

static Trajectory frc::TrajectoryParameterizer::TimeParameterizeTrajectory ( const std::vector< PoseWithCurvature > &  points,
const std::vector< std::unique_ptr< TrajectoryConstraint >> &  constraints,
units::meters_per_second_t  startVelocity,
units::meters_per_second_t  endVelocity,
units::meters_per_second_t  maxVelocity,
units::meters_per_second_squared_t  maxAcceleration,
bool  reversed 
)
static

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
pointsReference to the spline points.
constraintsA vector of various velocity and acceleration constraints.
startVelocityThe start velocity for the trajectory.
endVelocityThe end velocity for the trajectory.
maxVelocityThe max velocity for the trajectory.
maxAccelerationThe max acceleration for the trajectory.
reversedWhether the robot should move backwards. Note that the robot will still move from a -> b -> ... -> z as defined in the waypoints.
Returns
The trajectory.

The documentation for this class was generated from the following file: