PID waypoint tour¶
The smallest end-to-end example of the device-native controller shape: a deterministic, differentiable PID flies the articulated Astro Max, its rotors turned by Newton's motors, around a square of waypoints. One CUDA graph captures the whole tick: controller, rotor chain, physics, and sensors. It deploys the gains the design-optimization example converges to. It also doubles as the framework's determinism authority: on CPU it runs eager and bit-exact, the bit-reproducible CI gate a real PX4-in-the-loop flight can't give.
The square tour with the active waypoint advancing on arrival. A blank viewer means the
recording isn't uploaded yet. Run scripts/ci/evaluate_examples.py --upload.
Run it¶
uv run -m nexus_uav.examples pid # flies + asserts + writes the .rrd
Zero-arg by design: the configuration, vehicle, waypoints, and the proven gains, lives in the script. The example asserts the drone reaches every waypoint and dumps its trajectory for the CI harness.
Measured¶
| Metric | Value |
|---|---|
reached |
4 |
final_dist_m |
0.284 m |
rtf |
6.24× |
ape_trans_rmse_m |
0.825 m |
ape_trans_max_m |
1.642 m |
final_err_m |
0.284 m |
Measured on NVIDIA A10G · 2026-08-16 · commit b7d6504465c6
Regression gate¶
scripts/ci/evaluate_examples.py flies this example on every gpu-examples CI run and gates it
against scripts/ci/examples_baselines.json. The gate checks that every waypoint counts as
reached, an exact match, and that the final distance and pose Absolute Pose Error (APE) are
within bounds. It also checks that the steady Real Time Factor (RTF) stays within a fraction of its
recorded baseline. See Benchmarking for how the harness measures and
refreshes the numbers.