Expand description
Turret — gimbal control and MAVLink Gimbal Manager.
This crate is the library half of the turret package. The binary of the
same name (src/main.rs) is a thin CLI consumer of the API below.
§Quick start
let mut gimbal = turret::detect_gimbal("/dev/ttyUSB0")?;
gimbal.set_attitude(10.0, 0.0, -15.0)?;§Public surface
GimbalDevice— trait implemented by every supported gimbal backend.detect_gimbal— probe a serial device for a supported protocol and return a boxedGimbalDevice.Attitude— Euler angles returned by the device.Error/Result— typed errors at the library boundary.
Lower-level modules (protocols and device_scanner) are exposed
for advanced integration but do not yet guarantee a stable API surface.
For embedding the MAVLink Gimbal Manager + IPC server in your own
binary with a custom GimbalDevice (different protocol, simulator,
network-attached gimbal), see the module-level docs of daemon
(only built with the daemon feature, which is on by default).
§Cargo features
daemon(default) — pulls in tokio, the IPC server, the MAVLink Gimbal Manager, and thedaemonmodule. Disable withdefault-features = falseto use this crate as a lean Storm32 driver (justserialport,thiserror,tracing, andserde).cli(default) — pulls inclapandtracing-subscriberfor theturretbinary. The bin target requires bothclianddaemon.
Re-exports§
pub use error::Error;pub use error::Result;pub use gimbal::detect_gimbal;pub use gimbal::Attitude;pub use gimbal::GimbalDevice;
Modules§
- daemon
- Long-running daemon: IPC server + MAVLink Gimbal Manager + hot-plug recovery glued onto a single gimbal handle.
- device_
scanner - Auto-detect a connected STorM32 gimbal by USB CDC vendor / product id.
- error
- Library-boundary error type.
- gimbal
- Gimbal device abstraction and runtime auto-detection.
- protocols
- Wire-protocol drivers that implement
crate::gimbal::GimbalDevice.