THE PLANAR LIDAR.
A Richbeam LakiBeam1 planar laser scanner on top of the car. Your code reads it as ~1440 distances in centimetres, 0.25° apart, index 0 straight ahead. The array covers the full circle; the sensor's live window is 270°, so the rear wedge reads 0.
THE SCAN LAYOUT.
The full scan is one flat list. Index 0 is forward; the list wraps clockwise. To look at a direction, convert your angle to an index with one of the helpers below, or use rc_utils.get_lidar_average_distance(scan, angle, window_angle) and let it do the maths for you.
pythonscan = rc.lidar.get_samples() # ~1440 floats on the car, 720 in the sim print(len(scan)) # use this, never a hardcoded count print(scan[0]) # cm, straight forward print(scan[len(scan) // 4]) # cm, 90° right on any platform # For any other direction, let the helper do the index math: left = rc_utils.get_lidar_average_distance(scan, 270, window_angle=8) # 90° left front = rc_utils.get_lidar_average_distance(scan, 0, window_angle=4)
COMMON PITFALLS.
The rear is blind
Centimetres, not metres
Sample rate ≠ control rate
THE PYTHON API.
rc.lidar.get_samples() → NDArray[Float]· the raw scan in cm, ~1440 samples on the car.rc_utils.get_lidar_average_distance(scan, angle, window_angle=4)· average over a degree window. Skips blind-arc zeros for you.rc_utils.get_lidar_closest_point(scan, window=(0, 360))· returns(angle_deg, distance_cm).
THE /scan TOPIC.
Rate: 30 Hz
Frame: laser
QoS: Reliable, Volatile, depth 10
RICHBEAM LAKIBEAM1.
The scanner is an off-the-shelf Richbeam LakiBeam1. If you ever want the raw datasheet numbers straight from the source, the Richbeam LakiBeam product page is the place to go. These are the sensor's native numbers: it spins at 0.25° resolution, ~1440 samples per revolution, and the library hands you that scan as-is. Nothing is resampled; the 270° live window is a sensor setting, and the rear wedge outside it reads 0.
