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

Enforces a particular constraint only within an elliptical region. More...

#include <EllipticalRegionConstraint.h>

Inheritance diagram for frc::EllipticalRegionConstraint:

## Public Member Functions

EllipticalRegionConstraint (const Translation2d &center, units::meter_t xWidth, units::meter_t yWidth, const Rotation2d &rotation, const TrajectoryConstraint &constraint)
Constructs a new EllipticalRegionConstraint. More...

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

bool IsPoseInRegion (const Pose2d &pose) const
Returns whether the specified robot pose is within the region that the constraint is enforced in. More...

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

TrajectoryConstraintoperator= (const TrajectoryConstraint &)=default

TrajectoryConstraint (TrajectoryConstraint &&)=default

TrajectoryConstraintoperator= (TrajectoryConstraint &&)=default

## Detailed Description

Enforces a particular constraint only within an elliptical region.

## ◆ EllipticalRegionConstraint()

 frc::EllipticalRegionConstraint::EllipticalRegionConstraint ( const Translation2d & center, units::meter_t xWidth, units::meter_t yWidth, const Rotation2d & rotation, const TrajectoryConstraint & constraint )

Constructs a new EllipticalRegionConstraint.

Parameters
 center The center of the ellipse in which to enforce the constraint. xWidth The width of the ellipse in which to enforce the constraint. yWidth The height of the ellipse in which to enforce the constraint. rotation The rotation to apply to all radii around the origin. constraint The constraint to enforce when the robot is within the region.

## ◆ IsPoseInRegion()

 bool frc::EllipticalRegionConstraint::IsPoseInRegion ( const Pose2d & pose ) const

Returns whether the specified robot pose is within the region that the constraint is enforced in.

Parameters
 pose The robot pose.
Returns
Whether the robot pose is within the constraint region.

## ◆ MaxVelocity()

 units::meters_per_second_t frc::EllipticalRegionConstraint::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::EllipticalRegionConstraint::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: