Python: Radar Sensor#
This example loads radar_example.usda, renders a radar PointCloud,
maps the composite render variable to CPU memory, and visualizes detections in
rerun.io. Point color is derived from signed
RadialVelocityMs: blue is approaching the sensor, green is near zero, and
red is receding.
The scene is Z-up and contains a radar at (0, 0, 1) rotated to look along
world +X, an asphalt ground plane, a moving steel cube, and a fixed concrete
cube. The moving cube advances toward the radar across 10 simulation steps.
“Create a Python sensor example that loads a scene containing a configured radar and moving target, advances scene time over multiple steps, reads valid detections and signed radial velocity, prints per-step summaries, and optionally visualizes detections with velocity-based colors.”
Prerequisites#
Python 3.10-3.13
Running#
cd examples/python/sensors/radar
uv run main.py
Options#
Flag |
Description |
|---|---|
|
Load a different USDA scene |
|
Number of animated radar steps |
|
Disable Rerun visualization and print only the per-step summary |
|
Write a Rerun recording instead of spawning a viewer |
Expected console output values vary, but a successful run prints per-step valid point counts and radial velocity min/max values.