Skip to main content

Module racing_mppi_motor

Module racing_mppi_motor 

Source
Expand description

Reference-free racing MPPI with a motor-level rotor-mixing quadrotor.

This deepens crate::racing_mppi_quadrotor one more level: instead of commanding body rates directly, the control input is the four rotor thrusts. A rotor-mixing map turns them into a collective thrust and body torques, the body angular velocity becomes a state driven by those torques (with light aerodynamic rate damping), and every rotor saturates at a maximum thrust.

That saturation is the point: a rotor cannot supply maximum collective lift and a large differential torque at the same time, so demanding an aggressive attitude change steals thrust authority. A thrust-limited drone therefore saturates its rotors more often and is genuinely less agile — a trade-off the body-rate model (which commands rates for free) cannot express.

  • MotorQuadState carries position, velocity, a unit-quaternion attitude, and the body angular velocity.
  • MotorQuadParams integrates the rotor-mixing rotational dynamics (control-affine, with the inertia folded into roll/pitch/yaw gains and a rate-damping term) and the rigid-body translational dynamics.
  • MotorMppiController samples per-rotor thrust perturbations around a hover nominal and scores the resulting positions with the reference-free gate-progress objective from crate::racing_mppi_3d.
  • simulate_motor_race reports MotorRacingLapReport, which adds a rotor saturation fraction to the lap-progress and attitude metrics.

Structs§

MotorCommand
Four rotor thrust commands [f0, f1, f2, f3] in mass-normalized accel units.
MotorMppiConfig
Configuration for the motor-level racing MPPI controller.
MotorMppiController
Deterministic, seeded motor-level MPPI controller for gate racing.
MotorMppiPlan
Result of one plan call.
MotorQuadParams
Motor-level quadrotor parameters and actuation limits.
MotorQuadState
State of the motor-level quadrotor.
MotorRacingLapReport
Lap-progress, attitude, and motor-saturation metrics.

Functions§

simulate_motor_race
Drive the motor-level racing MPPI controller around a lap and report metrics.