This project uses a pipelined LiDAR data processor in FPGA fabric (DE10-NANO) to turn VLP-16 returns into a 100 x 100 occupancy grid. The HPS receives the LiDAR stream and the FPGA performs the per-point processing.
The processor handles two LiDAR returns at a time in three stages:
- Transform: looks up trigonometric coefficients and converts range, azimuth, and laser ID into fixed-point
x,y, andzcoordinates. - Filter and map: removes points below the configured height threshold or outside the grid, then maps accepted points to occupancy-grid cells.
- Read-modify-write: updates the grid confidence value for each cell, using banked memory and hazard handling to support two point lanes.
The occupancy grid is double-buffered: the FPGA writes the next frame while the HPS reads, displays, and clears the completed frame.
hps/lidar_script.c is the runtime program. It receives VLP-16 UDP packets, packs pairs of returns into three 32-bit writes for the FPGA, detects each full LiDAR rotation, swaps the grid buffer, and renders the completed grid in the terminal.
(Running on the HPS & FPGA - PuTTY Terminal Output)