Documentation Index
Fetch the complete documentation index at: https://docs.altnautica.com/llms.txt
Use this file to discover all available pages before exploring further.
Vision Navigation Modes
The plugin ships a mode picker that lets the operator choose how the companion produces a GPS-denied state estimate. Six modes are available. The Mission Control mode card filters the list against the estimators the running plugin can actually instantiate, so an operator never sees an option the agent cannot run on the detected hardware. Mode is a per-drone config field. Changing it from the GCS rewrites the plugin’s config on the agent, re-instantiates the estimator, and publishes a new heartbeat on the next tick.The modes at a glance
| Mode | Estimator | Camera | IMU | Rangefinder | MAVLink |
|---|---|---|---|---|---|
off | None | optional | optional | optional | none |
optical_flow | Lucas-Kanade | downward | gyro | required | comp 198 |
optical_flow_degraded | Lucas-Kanade | downward | gyro | optional | comp 198 |
vio_openvins | OpenVINS | forward or downward | gyro+accel | optional | comp 197 |
vio_vins_fusion | VINS-Fusion | forward or downward | gyro+accel | optional | comp 197 |
hybrid_of_plus_vio | Both | downward + forward | gyro+accel | optional | comp 198 + 197 |
comp 198 is the peripheral MAVLink component (OPTICAL_FLOW_RAD).
comp 197 is MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY
(VISION_POSITION_ESTIMATE). The ArduPilot EKF3 fuses the matching
source set when one of EK3_SRC1_VELXY, EK3_SRC1_POSXY, or
EK3_SRC1_YAW is configured for the corresponding input.
off
The plugin is loaded with all sensors discovered and the heartbeat is publishing, but the estimator emits nothing. Useful for:- Hardware diagnostics. Check that the camera and rangefinder are detected before you fly.
- Calibration runs. The intrinsics + extrinsics upload flow does not need an active estimator.
- Demo mode. Mission Control can show the Navigation tab populated without feeding the EKF.
off; the operator gets
no visual nag.
optical_flow
The default GPS-denied path. A downward camera plus a rangefinder. The Lucas-Kanade tracker produces a body-frame angular flow rate; the rangefinder gives it scale; the result becomesOPTICAL_FLOW_RAD on
comp 198 at 10 Hz.
Use this mode when:
- You have a downward USB or CSI camera
- You have a rangefinder (TF-Luna, LIDAR-Lite, VL53L1X, or one
relayed from the FC over
DISTANCE_SENSOR) - You want the most reliable GPS-denied estimator the plugin offers for low-altitude hover and waypoint flight
optical_flow_degraded
Same Lucas-Kanade tracker, but the scale comes from a four-rung altitude ladder instead of a dedicated rangefinder. The ladder walks:GLOBAL_POSITION_INT.relative_altfrom the FC’s baro-fused EKF. Quality multiplier 0.7.VFR_HUD.altminus the captured take-off altitude. Quality 0.6.GPS_RAW_INT.altminus take-off, gated on a 3D fix with HDOP ≤ 2 and an operator-set outdoor flag. Quality 0.4.- A static 1.5 m fallback. Quality 0.2.
degraded whenever the static fallback
is active.
Use this mode when:
- You do not have a rangefinder on the airframe
- The intended flight is short and at low altitude where baro is trustworthy
- You accept that horizontal velocity accuracy is lower than the full-rangefinder mode
vio_openvins
Visual-inertial odometry using OpenVINS. A camera (forward or downward) and the FC IMU feed a multi-state-constraint Kalman filter that produces a full six-degree-of-freedom pose at the camera frame rate. Output:VISION_POSITION_ESTIMATE on MAVLink component 197 at 30 Hz.
ArduPilot EKF3 fuses this when EK3_SRC1_POSXY, EK3_SRC1_VELXY,
and EK3_SRC1_YAW are set to ExternalNav (6).
Use this mode when:
- You have a forward-facing camera (indoor / corridor / inspection) OR a downward-facing camera (over-ground flight: agriculture, survey, SAR, pipeline patrol). The wizard surfaces an explicit orientation picker; the agent suggests the orientation that fits the host’s active suite.
- Global shutter is preferred over rolling shutter, but the plugin tunes the feature-tracking thresholds either way.
- You are running on a board with at least one Cortex-A76 core or equivalent (Rock 5C Lite, CM4-class, RK3576).
- You want pose plus heading and not just velocity.
- You will fly higher than the rangefinder can see, or in scenes where the camera bound to OF has nothing to track.
vio_vins_fusion
The same role asvio_openvins but uses HKUST VINS-Fusion (a
sliding-window bundle-adjustment estimator) instead of OpenVINS.
VINS-Fusion is more accurate than OpenVINS in low-feature or
texture-poor scenes because it does global optimisation over a
sliding window of frames. The cost is CPU: it needs roughly twice
the cycles OpenVINS uses for the same frame rate.
Use this mode when:
- You are running on a board with enough headroom (Rock 5C Lite or better; not Raspberry Pi 4B)
- The flight profile includes long stretches of low-feature scenes (corridor flight, indoor warehouse, repetitive texture) where the filter-only OpenVINS path would drift faster
- You can spare an extra 250 to 350 MB of RAM beyond OpenVINS’s footprint
hybrid_of_plus_vio
Both estimators running in parallel. A downward camera feeds the Lucas-Kanade tracker; a forward camera feeds the VIO engine. The EKF sees both inputs and fuses them. Use this mode when:- You have two cameras mounted on the airframe (downward + forward)
- You have CPU headroom for both estimators
- You want the redundancy of OF for low-altitude hover plus the altitude-independence of VIO
Fallback ladder
The plugin does not switch modes automatically in flight. Mode is an operator decision. What it does do is degrade gracefully within a mode:-
Within
optical_flowthe rangefinder is required at arm. If the rangefinder fails mid-flight the estimator marks itselfdegradedand the GCS surfaces the fallback banner. The operator chooses to land, switch source set on ArduPilot, or take manual. -
Within
optical_flow_degradedthe four-rung scale ladder walks itself. The estimator stays indegradedwhenever the static rung is active. The operator sees the active scale source in the sensors card and can flip the outdoor flag to enable GPS scaling. -
Within the VIO modes a sync-offset breach (greater than 30 ms
sustained) marks the estimator
degraded. A binary heartbeat miss for more than 2 seconds triggers an internal restart. The estimator reportsfailedafter three restart attempts inside the cooldown window. -
The EKF source-set switcher is the final operator escape
hatch. Switching back to
EK3_SRC1(GPS primary) at altitude is safe on ArduPilot; the EKF tolerates a one-time innovation spike on switch. PX4 does not support runtime source switching: the change requires a parameter write and an EKF restart.
Pre-arm check matrix
Each mode has a different pre-arm check set. The plugin’s pre-arm gate evaluates them every heartbeat tick and surfaces the result on Mission Control’s pre-arm card.| Check | OF | OF-degraded | VIO | Hybrid |
|---|---|---|---|---|
| Companion process active | yes | yes | yes | yes |
| Flow quality ≥ 50 | yes | yes | no | yes |
| Rangefinder healthy | yes | no | no | no |
| Any scale source healthy | no | yes | no | yes |
| Estimator converged | no | no | yes | yes |
| Intrinsics loaded | no | no | yes | yes |
| Extrinsics loaded | no | no | yes | yes |
| Sync offset ≤ 30 ms | no | no | yes | yes |
| Feature count ≥ 20 | no | no | yes | yes |
Next steps
- Calibration for the VIO setup
- Troubleshooting for what to do when a check fails or the estimator goes degraded
- Architecture for developers who want to add a new estimator