ados.sdk.drivers. Rust drivers implement the matching trait in ados_sdk::drivers. The two are method-for-method equivalents. Set agent.runtime in the manifest to python or rust to pick the language.
The six driver kinds
All six share the same preamble in both languages:
CameraDriver yields FrameBuffers, a GpsDriver yields GpsFixes, a GimbalDriver takes attitude commands. In Python the stream methods return an AsyncIterator. In Rust they return a SampleStream (a boxed Stream), and the opaque Python *Session class becomes the Session associated type.
Running a driver from your plugin
Your plugin owns the driver from start to finish:- In
on_start, construct the driver with its backend (a serial port, a USB handle, a MAVLink router handle). - Call
discover()and pick a candidate. If there is none, report the failure and return. - Call
open(candidate, config).configis your plugin’s operator config, validated againstconfig-schema.json. - Consume the kind-specific stream (
frame_iterator,fix_iterator,state_iterator,telemetry_iterator) in a task you start. - Publish what Mission Control should see with
ctx.telemetry.extendorctx.events.publish. Your plugin’s GCS half renders it. - In
on_stop, cancel the task and callclose(session).
agent/src/altnautica_gimbal_v2/plugin.py, and the FLIR Lepton plugin does the same in agent/src/altnautica_thermal_camera/plugin.py.
Manifest permissions
Declare only the hardware and data capabilities your driver actually uses.sensor.camera.register, sensor.depth.register, sensor.lidar.register, sensor.imu.register and sensor.payload.register are in the capability catalog, but this agent refuses to grant them (“not supported by this agent runtime”) because the host method they gate is not implemented. Declaring one buys nothing.
Risk levels and the full catalog are on Permissions.
Errors
Python drivers raise fromados.sdk.drivers.errors. Rust drivers return the DriverError enum from ados_sdk::drivers (every driver method returns DriverResult<T>).
DriverError is the base. DriverDeviceNotFound means the candidate disappeared between discover and open. DriverPermissionDenied means the device exists but the plugin process cannot open it (a missing udev rule, a locked USB device, an undeclared capability). The Rust enum mirrors these. InvalidParam is returned for an unknown set_param name or an unknown actuate action, and NotSupported for an optional capability the device lacks (a rate command on a position-only gimbal, RTCM injection on a non-RTK GPS). Other carries any recoverable condition that does not fit a named kind.
Raise these from your own driver code and handle them in your plugin. A plugin that raises an unhandled exception out of a lifecycle hook is handled per Lifecycle.
Next steps
Camera driver
The worked example, with the FLIR Lepton driver.
Gimbal driver
The MAVLink Gimbal v2 reference driver.
Vendor binaries
Ship a closed-source library or per-architecture binary.
Hardware testing
Mock backends, SITL and bench rigs.