77 [[nodiscard]]
double getWheelRadius()
const {
return kinematics_->getWheelRadius(); }
80 [[nodiscard]] std::vector<hal::motor::IMotor*>
getMotors() {
return kinematics_->getMotors(); }
89 { kinematics_->applyPowerCommand(direction, power_percent); }
92 void initControllers();
94 std::unique_ptr<kinematics::IKinematics> kinematics_;
99 ChassisVelocityControlConfig vel_ctrl_config_{};
100 hal::imu::IIMU& imu_;
102 VelocityController ctrl_vx_;
103 VelocityController ctrl_vy_;
104 VelocityController ctrl_wz_;
107 float last_gyro_wz_{0.0f};
kinematics::MotorCommands update(double dt)
kinematics::IKinematics & getKinematics()
std::size_t wheelCount() const
hal::imu::IIMU & getImu()
void resetVelocityControllers()
const kinematics::IKinematics & getKinematics() const
std::vector< hal::motor::IMotor * > getMotors()
double getWheelRadius() const
Drive(std::unique_ptr< kinematics::IKinematics > kinematics, const ChassisVelocityControlConfig &vel_config, hal::imu::IIMU &imu)
const ChassisVelocityControlConfig & getVelocityControlConfig() const
void applyPowerCommand(const foundation::ChassisVelocity &direction, int power_percent)
void setVelocityControlConfig(const ChassisVelocityControlConfig &config)
void setVelocity(const foundation::ChassisVelocity &v_body)
foundation::ChassisVelocity estimateState() const
const hal::imu::IIMU & getImu() const
foundation::Feedforward ff
AxisVelocityControlConfig vy
AxisVelocityControlConfig wz
AxisVelocityControlConfig vx
Feedforward terms for velocity and acceleration control.
Basic PID gains without integrator and output shaping parameters.
Interface for IMU abstraction.