6 changed files with 102 additions and 99 deletions
-
73intel/radar/metrology_suite/Auto_MCAP_SHENRON.md
-
5intel/radar/metrology_suite/README.md
-
77intel/radar/metrology_suite/walkthrough.md
-
13intel/radar/shenron_implementation_guide.md
-
31intel/radar/shenron_integration.md
-
2intel/scenarios/dashboard.md
@ -1,76 +1,73 @@ |
|||||
# 🪐 Walkthrough: Radar Metrology Suite (Iteration 18) |
|
||||
|
# 🪐 Walkthrough: Simulation Pipeline Alignment (Iteration 19) |
||||
|
|
||||
This walkthrough documents the full implementation and verification of the **Radar Metrology Suite**, a major architectural upgrade that exposes the internal signal processing states of the C-SHENRON radar engine for high-fidelity ADAS debugging. |
|
||||
|
This walkthrough documents the full implementation of the **Simulation Pipeline Alignment**, which synchronizes the automated `run.bat` workflow with the high-fidelity diagnostic standards of the radar metrology suite. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
## 🚀 1. Overview of Achievements |
## 🚀 1. Overview of Achievements |
||||
|
|
||||
The Metrology Suite has successfully transitioned the simulation from generating "Points" to generating a complete **Signal Spectrum**. |
|
||||
|
The simulation pipeline now behaves as a production-grade ADAS testbench, generating multi-radar data and telemetry in a single automated pass. |
||||
|
|
||||
- **Phase 1 (Engine Extraction):** Modified the CA-CFAR and RadarProcessor to capture raw energy matrices. |
|
||||
- **Phase 2 (Visual Pipeline):** Implemented real-time image colormapping (Viridis/Magma/Plasma) and MCAP streaming. |
|
||||
- **Phase 3 (Persistence):** Established a structured hierarchy for raw `.npy` and `.jsonl` telemetry. |
|
||||
- **Phase 4 (Verification):** Completed a 250-frame simulation sweep (Iteration 18) proving system stability. |
|
||||
|
- **Multi-Radar Support:** Concurrent synthesis of `awrl1432` and `radarbook` hardware profiles. |
||||
|
- **Protocol Alignment:** Topics and folder structures now match the `test_shenron` testbench identically. |
||||
|
- **Telemetry Integration:** Automatic extraction of SNR, Noise Floor, and Detection Bins. |
||||
|
- **Seamless MCAP:** Single-pass packaging of all raw point clouds, metrology heatmaps, and telemetry curves. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
## 📡 2. Visual Diagnostic Capabilities |
|
||||
|
## 📡 2. Unified Hardware Namespace |
||||
|
|
||||
We have introduced three new specialized heatmaps, now available as live topics in Foxglove: |
|
||||
|
Visualization topics in Foxglove are now organized by hardware profile for easy comparison: |
||||
|
|
||||
| Topic | Channel | Colormap | Purpose | |
|
||||
|
| Topic Namespace | Component | Colormap | Purpose | |
||||
| :--- | :--- | :--- | :--- | |
| :--- | :--- | :--- | :--- | |
||||
| `/radar/heatmaps/range_doppler` | RD Heatmap | **Viridis** | High-contrast view of targets in Velocity vs. Range space. | |
|
||||
| `/radar/heatmaps/range_azimuth` | RA Heatmap | **Magma** | Top-down spatial energy distribution (Bird's Eye View). | |
|
||||
| `/radar/heatmaps/cfar_mask` | Detection Gate| **Plasma** | Visualizes the "Detection Wall" (Noise $\times$ Threshold). | |
|
||||
|
| `/radar/native` | RAW CARLA | -- | Baseline physics points. | |
||||
|
| `/radar/{type}` | Shenron PCD | -- | High-fidelity rich point cloud. | |
||||
|
| `/radar/{type}/metrics` | Telemetry | Plot | SNR and Noise monitoring. | |
||||
|
| `/radar/{type}/heatmaps/ra`| RA Heatmap | **Jet** | Top-down spatial energy (BEV). | |
||||
|
| `/radar/{type}/heatmaps/rd`| RD Heatmap | **Viridis** | Range-Doppler spectrum analysis. | |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
## 📊 3. Deep Telemetry & Data Structure |
## 📊 3. Deep Telemetry & Data Structure |
||||
|
|
||||
For every frame processed, the system now persists bit-perfect data for offline engineering analysis. |
|
||||
|
The system persists data in a hardware-centric hierarchy inside each session folder. |
||||
|
|
||||
### Raw Signal Dumps (`metrology/`) |
|
||||
Saved in `Shenron_debug/iterations/<iter_name>/<radar_type>/metrology/`: |
|
||||
- **`rd/*.npy`**: 256x64 Raw Power floating-point matrices. |
|
||||
- **`ra/*.npy`**: 256x256 Angular energy polar-coordinates. |
|
||||
- **`cfar/*.npy`**: The adaptive threshold baseline for that specific frame. |
|
||||
|
### Raw Signal Dumps |
||||
|
Saved in `data/<session>/<radar_type>/metrology/`: |
||||
|
- **`rd/*.npy`**: Log-scaled power matrices. |
||||
|
- **`ra/*.npy`**: Polar-to-Cartesian scan-converted BEV maps. |
||||
|
- **`metrics.jsonl`**: Standardized telemetry records for Foxglove Telemetry panels. |
||||
|
|
||||
### Global Metrics (`metrics.jsonl`) |
|
||||
A frame-by-frame log of signal health, including: |
|
||||
- **`peak_snr_db`**: Signal-to-Noise ratio of the strongest target. |
|
||||
- **`avg_noise_floor`**: Estimated environment noise level. |
|
||||
- **`active_bins`**: Number of cells currently "breaking through" the CFAR gate. |
|
||||
|
### Performance Indicators |
||||
|
- **Real-time Streaming:** `PYTHONUNBUFFERED` logging enables instant SSE console feedback in the Dashboard. |
||||
|
- **GPU Acceleration:** Multi-radar synthesis is distributed across available CUDA cores. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
## 🏁 4. Verification Results (Iteration 18) |
|
||||
|
## 🏁 4. Verification Results |
||||
|
|
||||
The initial full-scale run of the suite confirmed **Optimal Signal Integrity**: |
|
||||
- **Peak SNR:** ~15.3 dB in peak frames (Confirmed by `metrics.jsonl`). |
|
||||
- **Processing Performance:** 16.63 Frames/Sec (Streaming images + PCD logic). |
|
||||
- **GPU Acceleration:** Confirmed active on `cuda:0:0`. |
|
||||
|
Recent full-scale runs confirm **Protocol Parity**: |
||||
|
- **Topic Integrity:** MCAP files are now 1:1 compatible with testbench dashboards. |
||||
|
- **Metric Accuracy:** SNR extraction is verified against the RD spectrum across all active hardware profiles. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
## 🛠️ 5. How to Use & Debug |
|
||||
|
## 🛠️ 5. How to Launch |
||||
|
|
||||
### Launching the Metrology Suite |
|
||||
To run a new iteration with full metrology extraction: |
|
||||
```powershell |
|
||||
cmd /c "C:\ProgramData\miniconda3\Scripts\activate.bat carla312 && python scripts/test_shenron.py --iter <your_name>" |
|
||||
``` |
|
||||
|
The pipeline is now optimized for "One-Click" execution via the Dashboard or CLI: |
||||
|
|
||||
### Signal Verification Utility |
|
||||
Use the specialized verification tool to check a single frame's signal chain: |
|
||||
|
### Scenario CLI |
||||
```powershell |
```powershell |
||||
cmd /c "C:\ProgramData\miniconda3\Scripts\activate.bat carla312 && python scripts/analysis/verify_metrology_logic.py" |
|
||||
|
./run.bat braking --frames 200 |
||||
``` |
``` |
||||
|
|
||||
|
### Dashboard GUI |
||||
|
Simply launch `dashboard.bat` and select your scenario. The post-processing (Shenron + MCAP) will trigger automatically upon completion. |
||||
|
|
||||
--- |
--- |
||||
|
|
||||
> [!IMPORTANT] |
> [!IMPORTANT] |
||||
> **Engineering Note:** The RA Heatmap uses a 1D Angle-FFT reduction across all Doppler bins. This provides a spatial "snapshot" that ignores velocity, making it ideal for checking multipath and ghosting against the ground-truth LiDAR map. |
|
||||
|
> **Engineering Note:** The RA Heatmap has transitioned to the **Jet (Radar Spectrum)** colormap and includes a safety clip to prevent numerical overflow in the log-conversion stage. |
||||
|
|
||||
*Verified by Antigravity | Date: 2026-04-08* |
|
||||
|
*Verified by Antigravity | Date: 2026-04-09* |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue