| Crates.io | turret |
| lib.rs | turret |
| version | 0.1.1 |
| created_at | 2025-09-12 20:28:19.8094+00 |
| updated_at | 2025-09-30 04:51:09.747053+00 |
| description | Command-line tool for controlling STorM32 turret controllers via RC Commands protocol |
| homepage | https://github.com/luofang34/turret |
| repository | https://github.com/luofang34/turret |
| max_upload_size | |
| id | 1836664 |
| size | 171,529 |
Command-line tool for STorM32 gimbal controllers. Uses the RC Commands protocol.
Download the latest release from Releases for your platform.
OR:
With a recent Rust installed:
cargo install turret
# Basic commands (auto-detects device)
turret status
turret set 10.0 0.0 -15.0
turret set -10,0,15 # comma-separated
turret set 1.5:-2.3:0 # colon-separated
turret center
turret version
# Manual device specification
turret --device /dev/ttyUSB0 status
# Verbose output for debugging
turret -v status # info
turret -vv status # debug
turret -vvv status # trace (shows raw protocol)
# Individual axis control
turret pitch 1500 # RC values 700-2300, 0 to recenter
turret roll 0 # recenter roll
# Pan mode and standby
turret pan-mode 3 # PANPANPAN mode
turret standby true
# Start daemon (auto-detects device)
turret --daemon
# Or with custom config
turret --daemon --config turret.yaml
# Connect via Unix socket (JSON commands)
echo '{"cmd": "status"}' | nc -U /tmp/turret.sock
echo '{"cmd": "set", "pitch": 10.0, "roll": 0.0, "yaw": -15.0}' | nc -U /tmp/turret.sock
echo '{"cmd": "center"}' | nc -U /tmp/turret.sock
# MAVLink on UDP:14550 - use pymavlink or QGroundControl
# Implements Gimbal Manager protocol
Configuration (turret.yaml):
device:
path: auto
ipc:
socket_path: /tmp/turret.sock
mavlink:
enabled: true
udp_port: 14550
sysid: 1
compid: 154
Priority System: MAVLink autopilot (highest) > GCS > Unix socket > CLI (lowest)
With a recent Rust installed:
# Clone and build
git clone https://github.com/luofang34/turret
cd turret
cargo build --release
Uses STorM32 RC Commands protocol over serial (115200 baud).
Message format: [0xFA][len][cmd][payload][crc16]
Supports: version query, angle setting, status reading, pan modes.
Auto-detects STM32 Virtual COM Port (VID:0x0483, PID:0x5740).
Falls back to common patterns: /dev/ttyACM*, /dev/ttyUSB*, COM*
dialout group or use sudo