Skip to main content

Module racing_mppi_quadrotor

Module racing_mppi_quadrotor 

Source
Expand description

Reference-free racing MPPI with a full quadrotor attitude model.

This deepens crate::racing_mppi_3d from a point-mass drone to a quadrotor whose orientation matters. The control input is the standard low-level agile- racing abstraction used by differential-flatness controllers: a mass- normalized collective thrust along the body z-axis plus three body rates.

  • QuadrotorState carries position, velocity, and a unit-quaternion attitude.
  • QuadrotorParams integrates the rigid-body translational dynamics (a = thrust * body_z - gravity - drag * v) together with quaternion attitude kinematics driven by the commanded body rates.
  • QuadrotorMppiController samples thrust/body-rate perturbations around a hover nominal, rolls them through the attitude dynamics, and scores the resulting positions with the reference-free gate-progress objective from crate::racing_mppi_3d. Because horizontal motion can only come from tilting the thrust vector, the position objective drives the attitude: the drone learns to pitch and roll toward the next gate.
  • simulate_quadrotor_race flies a deterministic, seeded controller around a lap and reports QuadrotorLapReport, which adds attitude metrics (tilt angle and body-rate effort) to the lap-progress metrics.

The gate geometry (RacingGatePlane3D, RacingGateLap3D) is reused directly from crate::racing_mppi_3d.

Structs§

QuadrotorControl
Commanded collective thrust and body rates for the quadrotor.
QuadrotorLapReport
Lap-progress and attitude metrics from a quadrotor racing rollout.
QuadrotorMppiConfig
Configuration for the deterministic quadrotor racing MPPI controller.
QuadrotorMppiController
Deterministic, seeded MPPI controller for quadrotor gate racing.
QuadrotorMppiPlan
Result of one plan call.
QuadrotorParams
Quadrotor rigid-body parameters and actuation limits.
QuadrotorState
State of the quadrotor: position [m], velocity [m/s], and a unit quaternion attitude [w, x, y, z] (body-to-world rotation).

Functions§

simulate_quadrotor_race
Drive the quadrotor racing MPPI controller around a lap and report lap-progress and attitude metrics.