How hebutmas/mas_vision works
rm_vision is a C++17 RoboMaster aiming-vision framework for headless Linux. The infantry workflow reads gimbal state and camera frames, selects armor or energy-mechanism detection from the incoming mode, then publishes detection and timing data for remote debugging; the excerpt does not show a target-command output stage. A separate calibration app captures checkerboard samples, computes and verifies camera calibration, and reports results. The README also documents USB-camera support and remote Rerun visualization. Some detector internals and runtime links are unsampled, so uncertain links are omitted or dashed.
Main entry points: infantry/main.cpp Infantry app · calibration/main.cpp Calibration app · main_debug.cpp Infantry debug · hikcamera.cpp Hik camera
Components 22
Applications
- Infantry app
apps/infantry/main.cpp - Calibration app
apps/calibration/main.cpp
Hardware I/O
- Hik camera
hardware/hikcamera/hikcamera.cpp - USB camera
hardware/usbcamera/usbcamera.cpp - Serial link
hardware/serialport/serialport.cpp
Vision modules
- Armor aiming
modules/auto_armor/auto_armor.cpp - Armor detector
modules/auto_armor/detection/detector.cpp - Armor model
modules/auto_armor/models/shenzhen_model.cpp - Buff detection
modules/auto_buff/auto_buff.cpp - Buff detector
modules/auto_buff/detection/detector.cpp - Buff refiner
modules/auto_buff/detection/refiner.cpp
Remote debugging
- Armor visualization
modules/auto_armor/debug/visualize.cpp - Buff visualization
modules/auto_buff/debug/visualize.cpp - Infantry debug
apps/infantry/main_debug.cpp - Rerun sink
tools/debug/debug.hpp - Video encoder
tools/debug/video/video_encoder.cpp
Shared tools
- Calibration logic
tools/calibration/calibration.cpp - YAML config
tools/config/config.hpp - Latest-frame slot
tools/latest_frame/latest_frame.hpp - Shared timebase
tools/time/time.hpp - Exit handling
tools/exiter/exiter.hpp
Other components
- Rerun Viewer
Connections 24
- Infantry app → Serial link: reads state
apps/infantry/main.cpp - Infantry app → Hik camera: reads frames
apps/infantry/main.cpp - Infantry app → Armor aiming: runs armor
apps/infantry/main.cpp - Infantry app → Buff detection: runs buff
apps/infantry/main.cpp - Armor detector → Armor model: uses model
modules/auto_armor/detection/detector.cpp - Armor aiming → Armor detector: dispatches detection
- Buff detection → Buff detector: dispatches detection
- Buff detector → Buff refiner: refines detections
- Hik camera → Latest-frame slot: publishes frames
- USB camera → Latest-frame slot: publishes frames
- Serial link → Latest-frame slot: publishes state
- Calibration app → Hik camera: captures images
apps/calibration/main.cpp - Calibration app → USB camera: captures images
apps/calibration/main.cpp - Calibration app → Calibration logic: calibrates camera
apps/calibration/main.cpp - Infantry app → Infantry debug: pushes results
apps/infantry/main.cpp - Infantry debug → Armor visualization: visualizes armor
apps/infantry/main_debug.cpp - Infantry debug → Buff visualization: visualizes buff
apps/infantry/main_debug.cpp - Infantry debug → Video encoder: encodes video
apps/infantry/main_debug.cpp - Infantry debug → Rerun sink: streams debug
- Calibration app → Rerun sink: reports progress
apps/calibration/main.cpp - Rerun sink → Rerun Viewer: streams telemetry
tools/debug/debug.hpp - Calibration app → YAML config: loads settings
apps/calibration/main.cpp - Infantry app → YAML config: loads settings
apps/infantry/main.cpp - Infantry app → Exit handling: checks shutdown
apps/infantry/main.cpp