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

A constraint on the maximum absolute centripetal acceleration allowed when traversing a trajectory. More...

#include <CentripetalAccelerationConstraint.h>

Inheritance diagram for frc::CentripetalAccelerationConstraint:

## Public Member Functions

CentripetalAccelerationConstraint (units::meters_per_second_squared_t maxCentripetalAcceleration)

units::meters_per_second_t MaxVelocity (const Pose2d &pose, units::curvature_t curvature, units::meters_per_second_t velocity) const override
Returns the max velocity given the current pose and curvature. More...

MinMax MinMaxAcceleration (const Pose2d &pose, units::curvature_t curvature, units::meters_per_second_t speed) const override
Returns the minimum and maximum allowable acceleration for the trajectory given pose, curvature, and speed. More...

Public Member Functions inherited from frc::TrajectoryConstraint
TrajectoryConstraint (const TrajectoryConstraint &)=default

TrajectoryConstraintoperator= (const TrajectoryConstraint &)=default

TrajectoryConstraint (TrajectoryConstraint &&)=default

TrajectoryConstraintoperator= (TrajectoryConstraint &&)=default

## Detailed Description

A constraint on the maximum absolute centripetal acceleration allowed when traversing a trajectory.

The centripetal acceleration of a robot is defined as the velocity squared divided by the radius of curvature.

Effectively, limiting the maximum centripetal acceleration will cause the robot to slow down around tight turns, making it easier to track trajectories with sharp turns.

## ◆ MaxVelocity()

 units::meters_per_second_t frc::CentripetalAccelerationConstraint::MaxVelocity ( const Pose2d & pose, units::curvature_t curvature, units::meters_per_second_t velocity ) const
overridevirtual

Returns the max velocity given the current pose and curvature.

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

Implements frc::TrajectoryConstraint.

## ◆ MinMaxAcceleration()

 MinMax frc::CentripetalAccelerationConstraint::MinMaxAcceleration ( const Pose2d & pose, units::curvature_t curvature, units::meters_per_second_t speed ) const
overridevirtual

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

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

Implements frc::TrajectoryConstraint.

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