Vehicle Abstraction Layer · Member 4 Workstream
Adapter Developer Guide
The Common Vehicle Interface (CVI) decouples Omnivision's decentralized autonomy fabric from underlying flight hardware. Add new or legacy platforms without rewriting the coordination stack.
Common Vehicle Interface (CVI)
The abstraction boundary is defined as an abstract base class VehicleAdapter in adapters/interface.py. It enforces a strictly typed contract so that the fleet coordinator, Raft leader election, and consensus bundle task allocation operate purely on standardized coordinate spaces.
Input: VehicleCommand
- • ARM / DISARM — Motor propulsion gate
- • TAKEOFF(altitude_m) — Controlled vertical climb
- • GOTO_WAYPOINT(lat, lon, alt, speed)
- • SET_VELOCITY(vx, vy, vz) — NED velocity steering
- • RETURN_TO_LAUNCH — Home/Rally recovery
- • SET_DEGRADATION_MODE — Explicit FR-6 faults
Output: VehicleTelemetry (Broadcast)
- • position — WGS84 lat, lon, alt_msl, alt_rel
- • velocity — NED frame vx, vy, vz in m/s
- • attitude — Euler roll, pitch, yaw radians
- • battery — Voltage (V), remaining (%), current (A)
- • health — Link quality, packet loss, sensor flags
- • flight_mode — SEARCH_PATROL, HOLD_RELAY, etc.
Implementation Architecture
from adapters.interface import VehicleAdapter, VehicleCommand, CommandExecutionResult, CommandStatus
class CustomPlatformAdapter(VehicleAdapter):
def connect(self) -> bool:
# Establish connection with hardware / SITL socket
self._is_connected = True
return True
def execute_command(self, cmd: VehicleCommand) -> CommandExecutionResult:
# Translate unified VehicleCommand into platform wire format
# Return ACK status and round-trip latency
return CommandExecutionResult(
command_id=cmd.command_id,
vehicle_id=self.vehicle_id,
status=CommandStatus.COMPLETED,
message="Wire command ACKed",
)
def get_latest_telemetry(self) -> VehicleTelemetry:
return self._latest_telemetry
Automated Verification Suite
100% FIDELITY PASSRun the automated test harness to verify command round-trip fidelity, telemetry bounds, and degradation mode state machines:
$ python -m unittest adapters/test_adapters.py