Skip to content

EV bridge: stop vehicle_visual_odometry when landed or OpenVINS unhealthy (ODL-147, refs ODL-146) - #59

Merged
palcode merged 1 commit into
mainfrom
fix/ev-bridge-landed-health
Nov 24, 2026
Merged

palcode merged 1 commit into
mainfrom
fix/ev-bridge-landed-health

Conversation

@palcode

@palcode palcode commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Refs ODL-147 (EV unsafe after landing) and ODL-146 (alignment yaw ~15°, diagnose only; not fixed here). Context: ODL-116 comments 613/614.

What

vision_px4_bridge now gates vehicle_visual_odometry with a pure, unit-tested EvPublishGate. It does not publish when:

  • PX4 reports landed / maybe_landed (/fmu/out/vehicle_land_detected) or the vehicle is disarmed (/fmu/out/vehicle_status_v1), or no land/arming state has arrived yet;
  • the OV sample gap is more than max_input_gap_s (0.5 s) or vehicle_local_position is older than max_local_position_age_s (0.5 s);
  • the odomimu position variance is more than max_position_variance (1.0 m²);
  • the OV speed is more than max_speed_mps (15 m/s).

It resumes only after resume_healthy_s (1.0 s) of continuous healthy, airborne samples, and bumps reset_counter. While on the ground it re-aligns the translation every sample through the existing _try_align path (yaw kept), so OV ground drift isn't carried into the next takeoff. Setting a max_* to 0 or less disables that check, and ev_gate_enable:=false restores the old behaviour. Warnings are logged once per reason change.

There is no feature-count check, because OpenVINS odomimu doesn't publish one.

Defaults come from the 2026-11-24 EV bags:

  • in air, healthy: variance below 0.06 m², speed below 6.5 m/s, gaps around 4 ms;
  • after touchdown: variance 0.5 → 27 m² while EKF2 followed the drift and the SITL drone re-took off.

Unchanged

  • GPS-only default: EKF2_EV_CTRL default stays 0, and the bridge only runs in the opt-in EV path.
  • No gate, judge or OpenVINS config changes.

Tests

  • New test_ev_publish_gate.py, including a real-node test for ground → air resume. It's added to the run-regression.sh pytest list.
  • Harness pytest: 448 passed. pytest ros2_ws/src: 457 passed, 6 xfailed.
  • Scenario fingerprints for all 7 scenarios are identical to origin/main (the bridge code isn't hashed).
  • The judge is untouched, so there are 0 verdict changes.
  • shellcheck and gitleaks are clean.

The verification flight result will be posted on ODL-147.

…(ODL-147)

EvPublishGate: no vehicle_visual_odometry while landed / maybe_landed /
disarmed, or when the OV sample gap, local_position age, odomimu position
variance or OV speed is out of bounds (ROS params, conservative defaults
from the 2026-11-24 EV flights). Resumes after 1 s healthy and airborne
with reset_counter bumped; translation re-aligned on the ground every
sample. EV stays opt-in; GPS-only runs never start the bridge.
@palcode
palcode merged commit 16cec88 into main Nov 24, 2026
4 checks passed
@palcode
palcode deleted the fix/ev-bridge-landed-health branch November 24, 2026 13:56
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