Final Report · Google Summer of Code 2026

ROS-Embedded LiDAR Perception in CARLA with AGL Visualization

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.

Organization
Automotive Grade Linux
Contributor
Shaurya Rane
Mentors
Jan-Simon Möller, Rob Woolley, Scott Murray
Target
Jetson Orin Nano (aarch64)
Stack
ROS 2 Humble · Yocto · Flutter
Code
HMI app · Gerrit
11
Upstream changes
Orin Nano
aarch64 target
Abstract

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.

Contents
  1. 01Overview and goals
  2. 02How the pipeline fits together
  3. 03Verified on the Jetson
  4. 04What was built, by component
  5. 05Every change, with links
  6. 06Reproduce it
  7. 07The integration problems
  8. 08Current state and what is next

01 Overview and goals

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.

The AGL LiDAR HMI running live on the Jetson Orin Nano: point cloud, radar sweep, and green detection boxes updating in real time, with the forward and aerial camera feeds
The HMI running on the board. A live capture from the Jetson: the point cloud, the radar sweep, and the green detection boxes update in real time as the on-target detector runs, alongside the forward and aerial camera feeds.

02 How the pipeline fits together

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.

recorded CARLA clip (ros2 bag, sqlite3) | v raw sensor /carla/lidar sensor_msgs/PointCloud2 | v on-target, ~30 Hz lidar_detector (PCL) voxel downsample -> passthrough crop -> RANSAC ground removal -> Euclidean clustering | v /carla/detections vision_msgs/Detection3DArray (+ _markers) | v rosbridge server :9090 WebSocket / JSON | v Flutter HMI (agl_lidar_demo) top-down cloud + boxes + front & aerial cameras

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.

Animated bird's-eye view: grey LiDAR points with green detection boxes appearing around the ego vehicle across frames
What the detector produces. Grey points are the raw CARLA LiDAR cloud, the red marker at the origin is the ego vehicle, and each green box is one clustered object. The count changes frame to frame as objects come in and out of range.

03 Verified on the Jetson

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.

The AGL LiDAR HMI on the Jetson: a top-down point cloud with green detection boxes and the front and aerial camera feeds
Live on the board. 694 points, 7 objects at 28 Hz, with the forward and aerial CARLA camera feeds.
A second frame of the AGL LiDAR HMI with detection boxes on clustered returns near the ego vehicle
Detections on clustered returns. The green boxes are computed on the target from the raw cloud, not replayed.
The Jetson Orin Nano developer kit on the bench, wired with a recovery jumper, USB-C to the laptop, and power, ready to flash
The hardware. The Jetson Orin Nano developer kit on the bench during bring-up. The full 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.
The AGL LiDAR demo running live on the Jetson Orin Nano's portrait display, recorded on the bench
Running on the board. The HMI live on the Jetson's own display: the point cloud, the radar sweep, and the green detection boxes, recorded on the bench.

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.

04 What was built, by component

Five pieces, from the app down to the board bring-up, all contributed upstream to AGL Gerrit.

1. Flutter HMI application

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.

2. On-target perception node

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.

3. Self-contained data pipeline

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.

4. Jetson board bring-up

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.

5. Upstream integration fixes

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.

05 Every change, with links

All work is public. Code changes went to AGL Gerrit (user shauryarane05); the HMI app lives in its own repository.

ChangeLayerGerrit
Add agl-lidar-demo applicationmeta-agl-devel31990
Autostart the rosbag replaymeta-agl-devel32069
Add lidar-detector perception node recipemeta-agl-devel32137
agl-lidar-demo: detect on-targetmeta-agl-devel32138
Jetson Orin Nano machine templatemeta-agl32153
Static GID for debug group (build unblock)meta-agl32152
Fix packagegroup line continuationmeta-agl-devel32155
Add meta-python layer dependencymeta-agl-devel32156
rosbridge-suite: valid SPDX licensemeta-agl-devel32177
rosbag2-py: fix Python extension SOABImeta-agl-devel32178
Add a README for the LiDAR perception demometa-agl-devel32179

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.

06 Reproduce it

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

07 The integration problems worth documenting

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.

rosbag2's Python bindings were built for the wrong architecture

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)

An invalid SPDX license stopped the image build at 77 percent

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)

Layer and packagegroup parse failures blocked the feature

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.

08 Current state, and what is next

Acknowledgements

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.

← Week 22
Home →