! { loop {} }\nuse physical_ai_hal::*;\n\n// CAPSTONE: the whole autonomy loop now lives on the metal. control() runs every\n// control period — like a TIMER interrupt — with no interpreter and no GC behind\n// it. Right now it only blinks the LED, so the rover never moves. Drive it into\n// the SHRUNKEN 0.12 m pad: steer proportionally on the bearing and EASE the\n// forward effort as the distance falls so you settle in instead of overshooting.\n// Then keep the LED as a non-blocking ~2 Hz heartbeat off millis().\nfn control(p: &mut Peripherals) {\n let dist = p.goal.distance(); // metres to the goal pad\n let _bearing = p.goal.bearing(); // radians, + = goal is to your LEFT\n\n // --- TODO: steering + eased forward drive ---\n // let turn = 1.2 * _bearing;\n // let forward = ??? ; // proportional in dist, capped\n // p.motors.set(forward - turn, forward + turn);\n p.motors.set(0.0, 0.0); // <-- rover sits still; fix me\n\n // --- heartbeat (keep this non-blocking) ---\n let on = (millis() / 250.0) as i32 % 2 == 0;\n p.led.set(on);\n}\ncontrol_loop!(control);\n","task":{"goal":[1.2,1.2],"requireBlink":6,"time":14,"tol":0.12},"title":"Optimize the Critical Loop to the Metal"}">
PYTHON · NUMPY · IN-BROWSER
Optimize the Critical Loop to the Metal
Re-implement the full autonomy loop as no_std embedded Rust firmware against the rover HAL. It compiles to WASM and runs DIRECTLY as the rover's control loop — no emulator. Capstone tolerance: land inside 0.12 m.