Skip to main content
The driver base classes and data types ship in both SDKs (ados.sdk.drivers in Python, ados_sdk::drivers in Rust), and the method contracts on these pages match them. The agent does not route drivers. It never calls discover(), open() or the iterators. register_*_driver calls return not_implemented, and the sensor.*.register capabilities are refused at grant time. A driver plugin opens and runs its own device from its lifecycle hooks, as the first-party Gimbal v2 plugin does. No Mission Control panel renders driver output.
A GimbalDriver moves a stabilised mount to a commanded attitude or rate, and reports the current pointing state. The first-party reference is MavlinkGimbalDriver in the MAVLink Gimbal v2 plugin (extensions/mavlink-gimbal-v2). It drives any gimbal that speaks the MAVLink Gimbal Manager Protocol v2 (ArduPilot or PX4 forwarding; Storm32 NT and Gremsy in MAVLink mode). It ships no serial SimpleBGC, Storm32 or Gremsy drivers.

The interface

In Rust the angles are f32, and command_rate returns DriverError::NotSupported on a position-only mount.

Capabilities

Limits are degrees from neutral. max_rate_dps=None means the gimbal is position-controlled only.

State

Drivers that cannot report rates leave *_rate_dps at 0.0. Put driver-specific status (fault codes, mount temperature, firmware version) under metadata. Your plugin’s GCS half renders this data; publish it with ctx.telemetry.extend or ctx.events.publish.

Region of interest

ROI is not part of the GimbalDriver contract. A driver that supports it adds its own methods. The reference driver adds set_roi_location and clear_roi, which map to MAV_CMD_DO_SET_ROI_LOCATION (195) and MAV_CMD_DO_SET_ROI_NONE (197).

Opening the driver from your plugin

The reference plugin builds its driver in on_start around a router handle for the agent’s MAVLink link, registers its MAVLink component, and feeds incoming GIMBAL_DEVICE_ATTITUDE_STATUS messages to driver.on_attitude_status(...). See agent/src/altnautica_gimbal_v2/plugin.py. For MAVLink gimbals declare mavlink.read, mavlink.write and mavlink.component.gimbal; the full table is on Driver layer.

Testing without hardware

Construct the driver against a mock MAVLink router. The reference plugin’s agent/tests/test_mavlink_driver.py shows the round trip: command pitch -30 and yaw 45, capture the encoded COMMAND_LONG, feed a GIMBAL_DEVICE_ATTITUDE_STATUS sample through driver.on_attitude_status(...), and assert the state updates.

Next steps

Driver layer

The shared contract and the manifest table.

MAVLink extensions

Own a MAVLink component id from a plugin.

Hardware testing

Mock routers and SITL.

LiDAR driver

The next driver kind.
Last modified on October 11, 2026