This directory contains a script demonstrating how to use the g3dlidarparse element for parsing LiDAR point‑cloud frames.
The g3dlidarparse element ingests raw LiDAR frames (BIN/PCD) and attaches LidarMeta (points, frame_id, timestamps, stream_id) for downstream fusion, analytics, or visualization.
The sample uses the GStreamer command‑line tool gst-launch-1.0 to build a pipeline string. Elements are separated by !, and properties are provided as property=value pairs.
This sample builds a pipeline of:
multifilesrcfor reading sequential LiDAR binary filesg3dlidarparsefor parsing LiDAR frames and attaching metadatafakesinkfor discarding output (metadata is attached to buffers)
The g3dlidarparse element performs:
- Input parsing: Reads raw LiDAR frames from
application/octet-stream - Frame thinning: Applies
strideandframe-ratecontrols - Metadata attachment: Emits
LidarMetawith point cloud data
Ensure DL Streamer is properly compiled and the g3dlidarparse element is available:
gst-inspect-1.0 g3dlidarparseIf the element is found, you should see detailed information about the element, its properties, and pad templates.
Download the sample lidar binary dataset:
DATA_DIR=velodyne
echo "Downloading sample LiDAR frames to ${DATA_DIR}..."
TMP_DIR=$(mktemp -d)
git clone --depth 1 --filter=blob:none --sparse https://github.com/open-edge-platform/edge-ai-suites.git "${TMP_DIR}/edge-ai-suites"
pushd "${TMP_DIR}/edge-ai-suites" >/dev/null
git sparse-checkout set metro-ai-suite/sensor-fusion-for-traffic-management/ai_inference/test/demo/kitti360/velodyne
popd >/dev/null
mkdir -p "${DATA_DIR}"
cp -a "${TMP_DIR}/edge-ai-suites/metro-ai-suite/sensor-fusion-for-traffic-management/ai_inference/test/demo/kitti360/velodyne"/* "${DATA_DIR}/"
rm -rf "${TMP_DIR}"This will create a velodyne directory containing the binary files of the lidar data.
export GST_DEBUG=g3dlidarparse:5Usage:
./g3dlidarparse.sh [LOCATION] [START_INDEX] [STRIDE] [FRAME_RATE]or
GST_DEBUG=g3dlidarparse:5 gst-launch-1.0 multifilesrc location="velodyne/%06d.bin" start-index=260 caps=application/octet-stream ! g3dlidarparse stride=5 frame-rate=5 ! fakesinkor
GST_DEBUG=g3dlidarparse:5 gst-launch-1.0 multifilesrc location="pcd/%06d.pcd" start-index=1 caps=application/octet-stream ! g3dlidarparse stride=5 frame-rate=5 ! fakesinkWhere:
locationpoints to a sequence of.binor.pcdfiles (zero-padded index)start-indexselects the starting frame indexstridecontrols how often frames are processedframe-ratethrottles the output frame rate
The sample:
- prints the full
gst-launch-1.0command to the console - outputs LiDAR parser debug logs and metadata summaries