Skip to content

Consume calibrated STDC danger maps - #4

Draft
cookacola wants to merge 79 commits into
mainfrom
vision
Draft

Consume calibrated STDC danger maps#4
cookacola wants to merge 79 commits into
mainfrom
vision

Conversation

@cookacola

Copy link
Copy Markdown
Contributor

What changed

  • Add a danger-only decoder path for the calibrated binary STDC output.
  • Apply conservative speed and stale-latency inflation.
  • Derive range/TTC conservatively and consume the validated gate-opening mask directly.
  • Update generated model quantization parameters.

Why

The GAP8 deployment emits a safety-calibrated binary danger map rather than the legacy multitask probabilities. The controller must preserve that conservative interpretation without treating rejected gate geometry as permission.

Validation

  • Host perception danger tests: 5 passed, covering all 14 calibrated scenarios
  • git diff --check

Known gap

A full STM32 cross-build could not run because arm-none-eabi-gcc is absent and Docker access is unavailable.

cookacola and others added 30 commits June 26, 2026 12:12
Poll the AI-deck corner link (gate8_link) each 50 Hz, project to a
world-frame gate center via gate_pnp, and expose it through the visGate
LOG/PARAM group. Perception only -- does not affect control. Wires
gate8_link.o / gate_pnp.o / gate_pnp_params.o into the build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When gateNav.navEn=1, override the commander setpoint with a gate waypoint:
latch the world gate center + approach direction on the first valid detection,
then steer the MPC toward a through-point gateNav.through metres past the center
along that direction, facing the gate, at gateNav.speed. The MPC plans position
to the through-point and the stock PID does low-level + face-gate yaw -- reusing
the cascade. Re-arms once the drone passes the gate. Default off (commander/hover
unchanged). Exposes gateNav params + latch/target logs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
circuit.en=1 flies a repeating oval through two SURVEYED gate world
positions (circuit.gAx..gBz): an ellipse with the gate centers at the
major-axis ends and semi-minor axis = circuit.loopW, at circuit.speed,
facing the loop tangent (face-forward yaw). Joins at the nearest phase
on enable. Overrides commander + single-gate nav; default off. Flown on
odometry -- vision drift correction is the next stage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Compare where the onboard vision says the drone is (imp_* = surveyed_gate -
measured_offset, logged by the circuit run) against mocap ground truth, to
quantify the camera + its calibration.

- tinympc_circuit_run.py: stamp a host wall-clock `host_t` per row and write a
  `*.meta.json` sidecar recording the kalman.resetEstimation instant, so a run
  can be time-joined and frame-aligned to a concurrent mocap log. Flight logic
  unchanged.
- compare_vision_truth.py: join a run CSV with a mocap_ros2_logger CSV, build the
  mocapWorld->reset-frame transform from the drone pose at reset (yaw + 3D
  translation; --align fit fallback), interpolate truth per row, and emit a
  per-frame comparison CSV (cam vs true vs odometry) plus RMS/bias/per-range
  summary. --sweep finds the camera latency; --gate-truth removes tape-survey
  error. Geometry validated against synthetic paired data.
- README_camera_accuracy.md: end-to-end runbook (clock sync, mocap logger on
  tiger, flight, analyze) and how to read the output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cookacola and others added 30 commits July 24, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant