114 wpi::units::meter_t left);
284 wpi::math::SwerveModuleVelocity state,
309 wpi::math::SwerveModuleVelocity
GetLockedState(wpi::math::Rotation2d angle)
const;
325 std::optional<std::string> m_telemetryName;
326 std::optional<TelemetryVerbosity> m_telemetryVerbosity;
327 std::optional<telemetry::SwerveModuleTelemetryConfig> m_specifiedTelemetryConfig;
328 std::optional<std::function<wpi::units::degree_t()>> m_absoluteEncoderSupplier;
329 std::optional<wpi::units::degree_t> m_absoluteEncoderOffset;
331 bool m_stateOptimization{
true};
332 bool m_cosineCompensation{
false};
333 std::optional<gearing::GearBox> m_couplingRatio;
334 std::any m_absoluteEncoder;
335 std::optional<wpi::units::meters_per_second_t> m_velocityDeadband{
336 wpi::units::meters_per_second_t{0.1}};
338 mutable std::optional<wpi::math::Rotation2d> m_lastCommandedAngle;
339 std::optional<wpi::math::Translation2d> m_location;
340 std::optional<wpi::units::meter_t> m_wheelCircumference;
350 double GetCosineCompensatedVelocity(
const wpi::math::SwerveModuleVelocity& desiredState,
351 const wpi::math::Rotation2d& currentAngle)
const;
357 wpi::math::Rotation2d GetAzimuthAngle()
const;
360 swerve::SwerveModuleVelocityWithAzimuth GetMeasuredAzimuth()
const;
374 static wpi::math::SwerveModuleVelocity Optimize(
375 wpi::math::SwerveModuleVelocity desired,
const wpi::math::Rotation2d& currentAngle,
376 const std::optional<wpi::math::Rotation2d>& lastCommanded);