How zmsbruce/rm_radar works
Project Type and Purpose
• This is a high-performance robotics perception pipeline written in C++20, built with CMake, running on Linux.
• It provides three core capabilities:
• Localization (point cloud + image ROI → field coordinates via PCL)
• Tracking (temporal filtering & data association via Kalman/Singer/Auction)
File Structure
• Top-level directories:
• src/ – implementation modules (detect, locate, track, robot orchestrator)
• models/ – ONNX model files for detection
• assets/ – sample point clouds & images
• samples/ – demo application using the library
• test/ – unit and integration tests per module
• cmake/ & CMakeLists.txt – build configuration
• doc/ – design & optimization docs
• Each src/<module>/CMakeLists.txt builds a self-contained library linked by src/robot/main
Extract Key Architecture from README
• Detection uses CUDA preprocessing + TensorRT inference
• Localization fuses LiDAR point clouds with camera detections and known extrinsics
• Tracking applies multiple filters (Kalman, Singer) and the auction algorithm for data association
• No UI, no I/O drivers—pure perception pipeline
Main Components
A. Input Sources
• Camera (image frames)
• LiDAR (point clouds)
B. Preprocessing
• CUDA kernels (in src/detect/detector.cu)
• TensorRT engine loader (src/detect/tensor.* & trt_logger.h)
C. Detection Module (src/detect)
• ONNX → TensorRT
D. Localization Module (src/locate)
• Coordinate transforms (camera ↔ LiDAR ↔ field)
• Outputs 2D/3D positions in field frame
E. Tracking Module (src/track)
• Feature extraction (features.h)
• Kalman & Singer filters + Auction association
• Outputs smooth target trajectories
F. Orchestrator / Robot Interface (src/robot)
• High-level pipeline that sequences detect→locate→track
• Exposes API for sample app
G. Sample Application (samples/main.cpp)
• Demonstrates end-to-end usage
H. Tests (test/)
• Unit tests per module
I. External Dependencies
• CUDA, TensorRT, OpenCV, PCL, Eigen, TBB, GTest
Relationships & Data Flow
• LiDAR → Localization (merge stream)
• The “robot” module orchestrates data movement between modules
• The sample app links the robot library and feeds it input assets
Important Architectural Patterns
• Modular libraries per concern (detect/locate/track)
• Pipeline/chain of responsibility for data processing
• GPU‐accelerated compute (CUDA + TensorRT) vs CPU compute (PCL, filters)
• CMake multi‐target build
• Unit testing per module
Essential Elements
• Clear component labels matching source folders
• Blue for GPU modules
• Green for CPU modules
• Grey for orchestration & samples