How radar-lab/mmpose-nlp works
Project Type and Purpose
• This is a research‐grade, multi‐component toolchain—an “open‐source tool” rather than a monolithic application—designed for mmWave radar–aided skeletal pose estimation using a Seq2Seq (GRU) architecture.
• Key functions: real‐time data capture from TI AWR1843 radars via ROS, offline model training/inference in Python, and posthoc visualization/analysis in MATLAB.
Top‐Level Components
a. Hardware & Data Acquisition
• TI AWR1843 mmWave radar units (see “TI AWR1843 Datasheets”).
• Serial link (RS-232/USB) driving radar control & data packets.
• ROS package (“multiradar_mmpose_ROS”) with C++ nodelets for:
– Parameter parsing & radar configuration
– mmWaveCommSrv & mmWaveDataHdl for streaming raw frames
– Publishing RadarScan.msg on ROS topics
b. Data Storage & Preprocessing
• DataHandlerClass (C++) writes raw+preprocessed frames to disk.
• On‐disk artifacts under “Dataset and Predictions”: .mat logs, .npy ground truth/predictions, CSV features.
c. Python ML Pipeline
• master_train_mmpose_nlp_gru.py: orchestrates training Seq2Seq model (mmpose + NLP features + GRU) on stored CSV/.mat data.
• master_infer_mmpose_nlp_gru.py: uses trained weights to generate pose predictions (.npy).
d. MATLAB Analysis & Visualization
• Scripts in “MATLAB Files” generate tables, plots, and side‐by‐side ground‐truth vs. prediction videos (Figures 3–7).
e. Outputs
• Under “Dataset and Predictions”:
– Continuous Data Videos (.avi) comparing GT vs. predictions
– Metrics (MAE, inference time)
– CSV/.npy result files
Component Interactions and Data Flow
1. Radar hardware → serial driver → ROS nodelets
2. ROS nodelets → publish RadarScan → DataHandlerClass
3. DataHandlerClass → write raw and pre‐processed data (.mat, .npy, CSV)
4. Python training script → read CSV/.mat → train Seq2Seq model → save model weights
5. Python inference script → load model & CSV inputs → output predicted joint positions (.npy)
6. MATLAB scripts → ingest GT & prediction arrays → compute metrics, generate figures & videos
Architectural Patterns & Principles
• Pipeline Pattern: clear, uni‐directional data flow from capture → storage → ML → visualization
• Modularity: separate C++/ROS layer, Python ML layer, MATLAB layer
• Separation of Concerns:
• Real‐time capture (ROS/C++)
• Batch ML processing (Python)
• Posthoc analysis (MATLAB)
1. “MMW Radar Sensors” (hardware)
2. “ROS Nodelets & Serial Drivers” (C++ layer)
3. “Data Storage & Preprocessing” (DataHandlerClass → files)
4. “Python ML Pipeline” (train & inference scripts)
5. “MATLAB Analysis & Visualization”
• Hardware → ROS (serial/RS-232)
• ROS → Storage (ROS topic: RadarScan.msg → .mat/.csv)
• Storage → Python (CSV/.mat → model)
• Python → Storage (model weights → .npy predictions)
• Storage → MATLAB (npy/.csv → figures & videos)
c. Component with key technologies:
• ROS (C++), serial lib, CMakeLists, msg/srv
• Python (PyTorch or mmpose, Seq2Seq, GRU)
• MATLAB
• File formats (.mat, .npy, .csv, .avi)
d. Feedback loops (e.g., model evaluation metrics back into training if iterative)
• Blue for capture layer (C++/ROS)
• Green for storage
• Orange for Python ML
• Purple for MATLAB
• Rectangles for compute modules
• Trapezoids for hardware