- [Physics] Disable R^2 area expansion in Sceneset.get_loss_3 to restore
physically correct 1/R^4 two-way radar power law (point scatterer model)
- [Metrology] Normalize RA heatmap [0,1] before variance calculation in
model_wrapper.py to prevent 1e20 scalar overflow values
- [Metrology] Add peak_azimuth_spread_deg (Half-Power Beamwidth proxy)
to signal metrics for per-frame angular resolution monitoring
- [DSP] Switch spatial Angle-FFT window from Hanning to Hamming in
radar_processor.py for sharper beamforming on small antenna arrays (6-8 Rx)
- [Telemetry] Expose az_std and spread in [SHENRON_STEP] dashboard stream
for both generate_shenron.py and test_shenron.py pipelines
- [BugFix] Add missing sys/os imports in src/main.py and video_stage.py
that caused NameError crashes in the stage-based pipeline orchestrator
This release marks a major architectural shift and achieves full feature
parity with the high-fidelity Shenron radar testbench.
Architecture:
- Implemented PipelineManager and Stage-based execution (Sim, Shenron, MCAP, Video).
- Decoupled recorder from physics/augmentation logic into src/processing/physics.py.
- Migrated all path resolution to Pathlib for cross-platform robustness.
Radar & Metrology:
- Integrated FastHeatmapEngine for stateful, high-performance RD/RA/CFAR rendering.
- Implemented dual-plot Range-Azimuth (Static Absolute vs Dynamic Peak).
- Flattened telemetry schema for direct Foxglove Plot panel compatibility.
- Added hardware-accurate 3D FOV frustum projections (LINE_LIST).
Dashboard & UX:
- Bumped version to v1.1.
- Fixed stop.flag detection bug in simulation shutdown.
- Optimized GPU headroom by maintaining idle/sync mode during synthesis.
Signed-off-by: Antigravity AI <cortex@deepmind.google>
This commit represents a major architectural upgrade to the CARLA ADAS simulation project, transitioning from stochastic Traffic Manager behavior to a fully deterministic, high-impact demo environment.
1. Deterministic Scenario Architecture
New Showcase Scenario: Implemented
scenarios/showcase.py
for a manual "Left-Turn Across Path" (LTAP) maneuver.
Physics Velocity Injection: Overrode engine/friction variance by directly setting set_target_velocity for NPC actors at 35 km/h.
Multi-Stage Waypoint Guidance: Integrated EGO_MID and P1_MID transition points to ensure realistic, cinematic turning radii and reliable collision-avoidance timing.
Manual Steering Controller: Developed a proportional steering-to-target helper for all actors.
2. Sensor & Data Pipeline
Dual-Camera Support: Integrated a second Third-Person Perspective (TPP) camera.
Radar Serialization Fix: Implemented trigonometric conversion of raw spherical coordinates (Depth, Azimuth, Altitude) into Cartesian XYZ + Velocity 16-byte PointClouds for Foxglove Studio.
Synchronization: Aligned all sensor data (Dash Cam, TPP Cam, Radar, Lidar) at the orchestrator level.
3. Performance & Asynchronous I/O
Asynchronous Recorder: Refactored
src/recorder.py
to use ThreadPoolExecutor, offloading cv2.imwrite operations to background threads to eliminate simulation stutter.
Rapid Iteration: Added --no-record global flag to
main.py
for sub-second iteration during coordinate tuning.
4. Automation & Seamless UX
Auto-MCAP conversion: Integrated
data_to_mcap.py
as a post-simulation callback in
main.py
.
Auto-Video Stitching: Implement automatic .mp4 generation for both camera views using OpenCV's VideoWriter.
Weather/Time CLI: Added --weather flag with presets (Clear, Rain, Sunset, Night).
Console Sync: Integrated tqdm for professional progress tracking and refactored scenario logging to use pbar.write() to prevent terminal flickering/staircasing.
5. Dependency Updates
Added tqdm as a core dependency for enhanced console visualization.
## Summary
First commit of the Fox CARLA simulation pipeline. Establishes a fully working,
end-to-end ADAS data collection and visualization system built on CARLA 0.9.16.
---
## What is included
### Core Pipeline
- Multi-sensor synchronous simulation (Camera, Radar, LiDAR) at configurable FPS
- Frame-aligned sensor data captured using CARLA synchronous mode with fixed delta time
- Structured dataset output: PNG images, NPY arrays, JSONL metadata per frame
- MCAP conversion script producing Foxglove-compatible topics (/camera, /lidar, /radar, /ego_pose)
- Ground truth vehicle tracking embedded in every frame record
### Modular Scenario Architecture
- Abstract ScenarioBase plugin interface (setup / step / cleanup lifecycle)
- Dynamic scenario loader via importlib main.py never imports scenarios by name
- Three implemented ADAS test scenarios:
- braking : Lead vehicle hard braking (emergency stop at configurable frame)
- cutin : Adjacent lane NPC forced lane change into ego lane
- obstacle : Static traffic cone placed on ego lane
- All NPC placement via CARLA waypoints zero hardcoded world coordinates
- Scenario metadata embedded into every JSONL frame record for MCAP traceability
### Orchestrator (src/main.py)
- Fully scenario-agnostic scenarios selected via --scenario CLI flag
- Supports --frames override for quick test runs without editing config
- Supports --list-scenarios for dry-run discovery (no CARLA server required)
- Deferred CARLA import so the process works without a live server for non-simulation commands
### Configuration (config.py)
- Single source of truth for all simulation, sensor, and scenario constants
- Scenario trigger frames and distances fully configurable without code changes
### Recorder (src/recorder.py)
- Session folders named <scenario>_YYYYMMDD_HHMMSS for easy identification
- extra_meta parameter merges scenario state into every frame record automatically
### Developer Tooling
- run.bat: one-click launcher that activates the carla312 conda environment
- intel/context.md: comprehensive AI-agent and developer reference document
- .gitignore: excludes data/, *.mcap, __pycache__, logs/, *.pyc
---
## Architecture
src/main.py (orchestrator)
|-- scenario_loader.py (importlib-based dynamic loader)
|-- sensors.py (SensorManager: camera + radar + lidar)
|-- recorder.py (per-frame data writer)
scenarios/
|-- base.py (ScenarioBase ABC)
|-- braking.py (BrakingScenario)
|-- cutin.py (CutInScenario)
|-- obstacle.py (ObstacleScenario)
config.py (all constants)
data_to_mcap.py (dataset -> MCAP converter)
run.bat (conda env launcher)
intel/context.md (codebase reference)
---
## Usage
run.bat braking
run.bat cutin --frames 120
run.bat obstacle
python data_to_mcap.py
---
## Environment
- CARLA 0.9.16
- Python conda env: carla312 (miniconda)
- Key deps: carla, numpy, opencv-python, mcap
---
## Known Limitations (future work)
- MCAP uses JSON encoding (functional; Protobuf migration planned)
- Intersection scenario not yet implemented (requires junction-aware waypoint logic)
- Single ego vehicle assumed throughout
- Foxglove layout presets not yet defined