23 double m_maxWheelSpeed{0.0};
28 std::array<double, 3> m_velCmdGain{1.0, 1.0, 1.0};
77 [[nodiscard]]
double getWheelRadius()
const override {
return m_wheelRadius; }
92 if (m_maxWheelSpeed <= 0.0)
93 return std::numeric_limits<double>::infinity();
94 const double lever = 0.5 * (m_wheelbase + m_trackWidth);
95 const double max_wheel_mps = m_maxWheelSpeed * m_wheelRadius;
96 return max_wheel_mps / (radius_m + lever);
100 [[nodiscard]] std::vector<hal::motor::IMotor*>
getMotors()
override;
110 int power_percent)
override;
std::size_t wheelCount() const override
void applyPowerCommand(const foundation::ChassisVelocity &direction, int power_percent) override
MecanumKinematics(hal::motor::IMotor *front_left_motor, hal::motor::IMotor *front_right_motor, hal::motor::IMotor *back_left_motor, hal::motor::IMotor *back_right_motor, double wheelbase, double trackWidth, double wheelRadius, foundation::VelocityCommandGain velocityCommandGain={})
std::vector< hal::motor::IMotor * > getMotors() override
foundation::ChassisVelocity estimateState() const override
MotorCommands applyCommand(const foundation::ChassisVelocity &cmd, double dt) override
void setMaxWheelSpeed(double max_wheel_speed)
void resetEncoders() override
void setVelocityCommandGains(double gx, double gy, double gw) override
std::array< double, 3 > getVelocityCommandGains() const override
double getMaxWheelSpeed() const
~MecanumKinematics() override=default
StmOdometryConfig getStmOdometryConfig() override
bool supportsLateralMotion() const override
double maxYawRateForArcRadius(double radius_m, bool) const override
double getWheelRadius() const override
Get the wheel radius used by this kinematics model.
Interface for motor abstraction.