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

A class that enforces constraints on the mecanum drive kinematics. More...

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

Inheritance diagram for wpi::math::MecanumDriveKinematicsConstraint:
wpi::math::TrajectoryConstraint

Public Member Functions

 MecanumDriveKinematicsConstraint (const MecanumDriveKinematics &kinematics, wpi::units::meters_per_second_t maxVelocity)
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.
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 class that enforces constraints on the mecanum drive kinematics.

This can be used to ensure that the trajectory is constructed so that the commanded velocities for wheels of the drivetrain stay below a certain limit.

Constructor & Destructor Documentation

◆ MecanumDriveKinematicsConstraint()

wpi::math::MecanumDriveKinematicsConstraint::MecanumDriveKinematicsConstraint ( const MecanumDriveKinematics & kinematics,
wpi::units::meters_per_second_t maxVelocity )
inline

Member Function Documentation

◆ MaxVelocity()

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

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::MecanumDriveKinematicsConstraint::MinMaxAcceleration ( const Pose2d & pose,
wpi::units::curvature_t curvature,
wpi::units::meters_per_second_t velocity ) const
inlineoverridevirtual

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: