|
YAMS
Yet Another Mechanism System
|
#include <SwerveModuleVelocityWithAzimuth.hpp>


Public Member Functions | |
| SwerveModuleVelocityWithAzimuth ()=default | |
| SwerveModuleVelocityWithAzimuth (wpi::units::meters_per_second_t velocity, wpi::math::Rotation2d angle, wpi::units::radians_per_second_t azimuthVelocity) | |
Static Public Member Functions | |
| static wpi::math::SwerveModuleVelocity | Optimize (const wpi::math::SwerveModuleVelocity &desired, const SwerveModuleVelocityWithAzimuth &measured, const std::optional< wpi::math::Rotation2d > &lastCommanded, wpi::units::degree_t hysteresis=wpi::units::degree_t{30}) |
Public Attributes | |
| wpi::units::radians_per_second_t | azimuthVelocity {0} |
A swerve module velocity that also carries how fast the azimuth is turning.
|
default |
|
inline |
| velocity | Wheel velocity. |
| angle | Azimuth angle. |
| azimuthVelocity | How fast the azimuth is turning. |
|
inlinestatic |
Optimize a desired state against the measured one, keeping the orientation the wheel was last sent to unless the other is better by more than the hysteresis. Without it a wheel that is still turning reverses back and forth as the target moves across the 90 degree boundary.
| desired | Desired state. |
| measured | Measured state. |
| lastCommanded | Angle the wheel was last sent to, if any. |
| hysteresis | How much better the other orientation must be before the wheel reverses. |
| wpi::units::radians_per_second_t yams::mechanisms::swerve::SwerveModuleVelocityWithAzimuth::azimuthVelocity {0} |
How fast the azimuth is turning.