Skip to main content

simulate_powertrain_race

Function simulate_powertrain_race 

Source
pub fn simulate_powertrain_race(
    config: MotorMppiConfig,
    params: PowertrainParams,
    lap: &RacingGateLap3D,
    start: PowertrainState,
    max_steps: usize,
    target_laps: usize,
) -> RoboticsResult<PowertrainLapReport>
Expand description

Drive the powertrain-unaware MPPI controller through the real powertrain.

The controller plans rotor commands with config and params.base, assuming ideal actuators; each command is then executed through the lagging, sagging powertrain. The gap between plan and execution is the point.