Python: Lidar Sensor#
This example loads lidar_example.usda, renders a lidar PointCloud,
maps the composite render variable to CPU memory, and visualizes detections in
rerun.io. Point color is derived from the Intensity
channel.
The scene is Z-up and contains a lidar at (0, 0, 1) rotated to look along
world +X, an asphalt ground plane, and a concrete cube. The USD requests
Coordinates, Intensity, Counts, and TimeOffsetNs channels.
“Create a Python sensor example that loads a scene containing a configured lidar, warms up the sensor pipeline, renders one point-cloud frame, reads valid point data using the count channel, prints summary statistics, and optionally visualizes the points with intensity-based colors.”
Prerequisites#
Python 3.10-3.13
Running#
cd examples/python/sensors/lidar
uv run main.py
Options#
Flag |
Description |
|---|---|
|
Load a different USDA scene |
|
Disable Rerun visualization and print only the frame summary |
|
Write a Rerun recording instead of spawning a viewer |
Expected console output values vary, but a successful run prints the number of valid points, mean intensity, and maximum time offset in nanoseconds.