WPILibC++  2020.3.2-60-g3011ebe
frc::TrajectoryConstraint Class Referenceabstract

An interface for defining user-defined velocity and acceleration constraints while generating trajectories. More...

#include <TrajectoryConstraint.h>

Inheritance diagram for frc::TrajectoryConstraint:
frc::CentripetalAccelerationConstraint frc::DifferentialDriveKinematicsConstraint frc::DifferentialDriveVoltageConstraint frc::EllipticalRegionConstraint frc::MaxVelocityConstraint frc::MecanumDriveKinematicsConstraint frc::RectangularRegionConstraint frc::SwerveDriveKinematicsConstraint< NumModules >

Classes

struct  MinMax
 Represents a minimum and maximum acceleration. More...
 

Public Member Functions

 TrajectoryConstraint (const TrajectoryConstraint &)=default
 
TrajectoryConstraintoperator= (const TrajectoryConstraint &)=default
 
 TrajectoryConstraint (TrajectoryConstraint &&)=default
 
TrajectoryConstraintoperator= (TrajectoryConstraint &&)=default
 
virtual units::meters_per_second_t MaxVelocity (const Pose2d &pose, units::curvature_t curvature, units::meters_per_second_t velocity) const =0
 Returns the max velocity given the current pose and curvature. More...
 
virtual MinMax MinMaxAcceleration (const Pose2d &pose, units::curvature_t curvature, units::meters_per_second_t speed) const =0
 Returns the minimum and maximum allowable acceleration for the trajectory given pose, curvature, and speed. More...
 

Detailed Description

An interface for defining user-defined velocity and acceleration constraints while generating trajectories.

Member Function Documentation

◆ MaxVelocity()

virtual units::meters_per_second_t frc::TrajectoryConstraint::MaxVelocity ( const Pose2d pose,
units::curvature_t  curvature,
units::meters_per_second_t  velocity 
) const
pure virtual

Returns the max velocity given the current pose and curvature.

Parameters
poseThe pose at the current point in the trajectory.
curvatureThe curvature at the current point in the trajectory.
velocityThe velocity at the current point in the trajectory before constraints are applied.
Returns
The absolute maximum velocity.

Implemented in frc::DifferentialDriveVoltageConstraint, frc::EllipticalRegionConstraint, frc::RectangularRegionConstraint, frc::SwerveDriveKinematicsConstraint< NumModules >, frc::CentripetalAccelerationConstraint, frc::MaxVelocityConstraint, frc::MecanumDriveKinematicsConstraint, and frc::DifferentialDriveKinematicsConstraint.

◆ MinMaxAcceleration()

virtual MinMax frc::TrajectoryConstraint::MinMaxAcceleration ( const Pose2d pose,
units::curvature_t  curvature,
units::meters_per_second_t  speed 
) const
pure virtual

Returns the minimum and maximum allowable acceleration for the trajectory given pose, curvature, and speed.

Parameters
poseThe pose at the current point in the trajectory.
curvatureThe curvature at the current point in the trajectory.
speedThe speed at the current point in the trajectory.
Returns
The min and max acceleration bounds.

Implemented in frc::DifferentialDriveVoltageConstraint, frc::EllipticalRegionConstraint, frc::RectangularRegionConstraint, frc::SwerveDriveKinematicsConstraint< NumModules >, frc::MaxVelocityConstraint, frc::CentripetalAccelerationConstraint, frc::MecanumDriveKinematicsConstraint, and frc::DifferentialDriveKinematicsConstraint.


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