A LiDAR perception demo for Automotive Grade Linux. A recorded CARLA clip is turned into 3D object detections on the embedded target and drawn in the vehicle's Flutter dashboard, running offline on the Jetson Orin Nano.
This project adds a LiDAR perception demo to Automotive Grade Linux, the Linux Foundation's open software stack for production vehicles. The goal was a demo an AGL developer can build and run on real hardware from a single image, mirroring a production ADAS feature: a LiDAR point cloud is turned into 3D object detections on the embedded target, and those detections are drawn in the vehicle's Flutter human-machine interface. It had to run fully offline, with no live simulator, no GPU, and no network. The work split into the Flutter HMI application, a ROS 2 perception node, and the Yocto integration that packages both into the AGL image, all upstreamed to AGL Gerrit. The summary below states what was built, where every change landed, the integration problems that were the real work, and the demo running live on the Jetson Orin Nano.
A demo that comes up on its own, on real hardware, and shows the shape of a production perception feature end to end.
Automotive Grade Linux is a Linux Foundation project building an open software stack for production vehicles. This project adds a complete, reproducible LiDAR perception demo to that stack, from the raw sensor data all the way to the in-vehicle display. The deliverable splits in two: the Flutter HMI application in its own repository, and the Yocto integration that packages the app, a ROS 2 perception node, and the data pipeline into the AGL image, upstreamed to AGL Gerrit. The constraint that shaped everything was that it had to run with no live simulator, no GPU, and no network, so it works as a dependable demonstration anywhere.
A recorded CARLA clip replays the raw sensor streams. A PCL node on the board turns the point cloud into detections in real time. The HMI subscribes over a rosbridge WebSocket and draws them.
The detector is a classic PCL pipeline. What matters is where it runs: on the target, from the raw cloud, at around 30 hertz, not replayed from the bag. It publishes vision_msgs/Detection3DArray on /carla/detections plus cube markers on /carla/detections_markers, the exact contract the HMI already consumes. The app is wired to the message, not to the algorithm, so a learned detector could replace the clustering later without touching the dashboard.
The detector runs a fixed sequence of PCL filters on every frame:
Each cluster becomes an axis-aligned 3D box. Ground removal is the stage that makes clustering work at all: while every point is connected through the road surface, proximity grouping just returns one giant blob. The node reports clusters, not classified objects, so a car, a pedestrian, a pole, and a run of roadside wall all come back as boxes; size filtering and a classifier are the natural next step.
The screenshots below are captured from the Jetson's own display while the pipeline runs on the board. The badges (points, objects, hertz, LIVE) are driven by the on-target detector, frame by frame.
agl-ivi-demo-flutter image builds from AGL's own tree, flashes to this board, and boots into the demo with the detector running on the device.
Getting there was the usual embedded gap between a clean build and a clean first boot. The image built and flashed on the first proper attempt, but the backend crash-looped on boot, and the SPDX license step had already stopped an earlier build dead at 77 percent. Those are the problems worth documenting, in section 07.
Five pieces, from the app down to the board bring-up, all contributed upstream to AGL Gerrit.
Built the dashboard in Flutter. It opens one rosbridge WebSocket, subscribes to four topics, and decodes each PointCloud2 frame by hand from its base64 payload (reading x, y, z and intensity at their byte offsets), drops ground and roof returns by height, and projects the rest to a top-down view. A custom painter draws the cloud in batched colour bands, the 3D detection boxes (recovering each box heading from its quaternion), a radar sweep and the ego vehicle, while two panels decode the compressed camera frames. It is wired to the message type rather than the algorithm, and built on the AGL app template so the platform launches it as a home-screen tile. Source: agl-lidar-hmi-app, packaged upstream as agl-lidar-demo.
Wrote the C++ ROS 2 node (lidar_detector) that runs the PCL pipeline on the device, turning each raw cloud into axis-aligned 3D boxes published as vision_msgs/Detection3DArray, and packaged it with an ament_cmake recipe so a single image build installs it ready to run. This is the step that moved the demo from replaying pre-recorded boxes to computing detections live on the target, the embedded-perception goal in the project title.
Recorded a CARLA LiDAR-and-cameras clip into a ros2 bag, and wrote the systemd service and launcher that on boot start a local rosbridge, replay only the raw sensor streams, and run the detector, so the whole demo comes up offline with no simulator, GPU or network. Added a DEMO_MODE switch that keeps a pure-replay path for images built without the perception package, so the demo degrades gracefully.
Wrote the machine template for the jetson-orin-nano-devkit-nvme target and the build-unblocking fix, built the full AGL IVI image for it, and flashed and brought it up on the board, so the demo runs on real embedded hardware.
Debugged and fixed the four things that stopped the image building clean and the backend running on the target: a packagegroup parse error, a missing layer dependency, invalid SPDX licenses across the rosbridge suite, and a cross-compile bug that named the rosbag2 Python bindings with the build-host architecture. Detailed in section 07.
All work is public. Code changes went to AGL Gerrit (user shauryarane05); the HMI app lives in its own repository.
| Change | Layer | Gerrit |
|---|---|---|
| Add agl-lidar-demo application | meta-agl-devel | 31990 |
| Autostart the rosbag replay | meta-agl-devel | 32069 |
| Add lidar-detector perception node recipe | meta-agl-devel | 32137 |
| agl-lidar-demo: detect on-target | meta-agl-devel | 32138 |
| Jetson Orin Nano machine template | meta-agl | 32153 |
| Static GID for debug group (build unblock) | meta-agl | 32152 |
| Fix packagegroup line continuation | meta-agl-devel | 32155 |
| Add meta-python layer dependency | meta-agl-devel | 32156 |
| rosbridge-suite: valid SPDX license | meta-agl-devel | 32177 |
| rosbag2-py: fix Python extension SOABI | meta-agl-devel | 32178 |
| Add a README for the LiDAR perception demo | meta-agl-devel | 32179 |
Eleven changes in all, authored this summer and listed under this Gerrit query, and the HMI application is at github.com/shauryarane05/agl-lidar-hmi-app.
The demo ships under the AGL agl-ros2 feature, on top of the Flutter IVI demo. From the top of the AGL tree:
source meta-agl/scripts/aglsetup.sh \
-m jetson-orin-nano-devkit-nvme -b build-jetson-ivi \
agl-demo agl-flutter agl-ros2
bitbake agl-ivi-demo-flutter
Flash the image, boot, and the backend starts itself: a local rosbridge on port 9090, the lidar_detector node, and the bag replay, all under one systemd service. Open the "AGL LiDAR Demo" tile, or launch it through the shell activator, and the view comes up. To check the pipeline is live on the board:
ros2 topic hz /carla/detections # expect ~30 Hz
ros2 topic info /carla/detections --verbose # publisher: lidar_detector, not the bag
None of these are in the perception algorithm. All of them stopped the demo cold until they were found, and the small, exact fixes for them are the most reusable thing the project produced.
On the first on-target boot the backend crash-looped. ros2 bag play died with "No module named 'rosbag2_py._reader'", even though the file was sitting right there. The compiled extensions were correct aarch64 binaries, but meta-ros had named them with the build host SOABI (...x86_64...), so the target Python, which computes an aarch64 SOABI, never matched them on import.
fix A bbappend that renames the extensions to the target architecture, keyed on the build and target arch so it is a no-op on native builds. Build-verified. (32178)
Every rosbridge-suite recipe declared LICENSE = "BSD", which is not a valid SPDX identifier, so AGL's license tooling refused it. Fixing rosbridge-server alone was not enough; the image pulls in six more packages that each trip the same error.
fix A valid BSD-3-Clause bbappend for all seven recipes. (32177)
A missing trailing backslash in the ROS 2 packagegroup, and a missing meta-python entry in the layer list, each broke parsing for any image enabling the agl-ros2 feature.
fix Two small corrections. (32155, 32156)
The through line. On a project like this the perception algorithm is the easy part. The clustering and the bounding boxes are a solved problem. The time went into the seams, the places where a generated ROS 2 layer, a vendor board support package, and a Flutter shell are supposed to meet and do not. The most useful thing I shipped was the handful of small fixes that let the next person build the image on the first try.
meta-agl, and the four agl-ros2 integration fixes in meta-agl-devel. The last commit of the summer is the rosbag2-py fix, 32178.Thank you to my mentors, Jan-Simon Möller, Rob Woolley, and Scott Murray, for the reviews, the hardware guidance, and the patience through the long integration debugging, and to the wider Automotive Grade Linux community for a welcoming, well-run project. Thanks also to Google Summer of Code for the opportunity.