WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::math::CentripetalAccelerationConstraint Class Reference

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

#include <wpi/math/trajectory/constraint/CentripetalAccelerationConstraint.hpp>

Inheritance diagram for wpi::math::CentripetalAccelerationConstraint:
wpi::math::TrajectoryConstraint

Public Member Functions

constexpr CentripetalAccelerationConstraint (wpi::units::meters_per_second_squared_t maxCentripetalAcceleration)
constexpr wpi::units::meters_per_second_t MaxVelocity (const Pose2d &pose, wpi::units::curvature_t curvature, wpi::units::meters_per_second_t velocity) const override
 Returns the max velocity given the current pose and curvature.
constexpr MinMax MinMaxAcceleration (const Pose2d &pose, wpi::units::curvature_t curvature, wpi::units::meters_per_second_t velocity) const override
 Returns the minimum and maximum allowable acceleration for the trajectory given pose, curvature, and velocity.
Public Member Functions inherited from wpi::math::TrajectoryConstraint
constexpr TrajectoryConstraint ()=default
constexpr TrajectoryConstraint (const TrajectoryConstraint &)=default
constexpr TrajectoryConstraintoperator= (const TrajectoryConstraint &)=default
constexpr TrajectoryConstraint (TrajectoryConstraint &&)=default
constexpr TrajectoryConstraintoperator= (TrajectoryConstraint &&)=default
virtual constexpr ~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.

Constructor & Destructor Documentation

◆ CentripetalAccelerationConstraint()

wpi::math::CentripetalAccelerationConstraint::CentripetalAccelerationConstraint ( wpi::units::meters_per_second_squared_t maxCentripetalAcceleration)
inlineexplicitconstexpr

Member Function Documentation

◆ MaxVelocity()

wpi::units::meters_per_second_t wpi::math::CentripetalAccelerationConstraint::MaxVelocity ( const Pose2d & pose,
wpi::units::curvature_t curvature,
wpi::units::meters_per_second_t velocity ) const
inlineconstexproverridevirtual

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.

Implements wpi::math::TrajectoryConstraint.

◆ MinMaxAcceleration()

MinMax wpi::math::CentripetalAccelerationConstraint::MinMaxAcceleration ( const Pose2d & pose,
wpi::units::curvature_t curvature,
wpi::units::meters_per_second_t velocity ) const
inlineconstexproverridevirtual

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

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.
Returns
The min and max acceleration bounds.

Implements wpi::math::TrajectoryConstraint.


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