WPILibC++ 2024.3.2
|
A class that enforces constraints on the mecanum drive kinematics. More...
#include <frc/trajectory/constraint/MecanumDriveKinematicsConstraint.h>
Public Member Functions | |
MecanumDriveKinematicsConstraint (const MecanumDriveKinematics &kinematics, units::meters_per_second_t maxSpeed) | |
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 ()=default | |
TrajectoryConstraint (const TrajectoryConstraint &)=default | |
TrajectoryConstraint & | operator= (const TrajectoryConstraint &)=default |
TrajectoryConstraint (TrajectoryConstraint &&)=default | |
TrajectoryConstraint & | operator= (TrajectoryConstraint &&)=default |
virtual | ~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... | |
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.
frc::MecanumDriveKinematicsConstraint::MecanumDriveKinematicsConstraint | ( | const MecanumDriveKinematics & | kinematics, |
units::meters_per_second_t | maxSpeed | ||
) |
|
overridevirtual |
Returns the max velocity given the current pose and curvature.
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. |
Implements frc::TrajectoryConstraint.
|
overridevirtual |
Returns the minimum and maximum allowable acceleration for the trajectory given pose, curvature, and speed.
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. |
Implements frc::TrajectoryConstraint.