Ready-to-run examples for working with EdgeFirst Perception Middleware topics.
This repository provides sample applications demonstrating how to subscribe to and process topics from EdgeFirst Perception Middleware—a modular edge AI platform for vision, LiDAR, radar, and sensor fusion on embedded Linux devices.
Quick Links: Developer Guide • Latest Release • Contributing
Download the ZIP file for your platform from the latest release:
| Platform | Download |
|---|---|
| Linux x86_64 | edgefirst-samples-linux-x86_64.zip |
| Linux aarch64 | edgefirst-samples-linux-aarch64.zip |
| macOS Intel | edgefirst-samples-macos-x86_64.zip |
| macOS Apple Silicon | edgefirst-samples-macos-aarch64.zip |
| Windows x86_64 | edgefirst-samples-windows-x86_64.zip |
Extract the archive and navigate to the directory:
unzip edgefirst-samples-linux-x86_64.zip
cd edgefirst-samples-linux-x86_64All samples support both local (on-device) and remote (over network) connections:
# Local mode - auto-discovers topics on EdgeFirst device
./list-topics
# Remote mode - connect to EdgeFirst device at specific IP
./list-topics --remote 192.168.1.100:7447Note: When running remotely, ensure the Zenoh router (
zenohd) is enabled on the EdgeFirst device withsudo systemctl enable --now zenohd.
The EdgeFirst Perception Middleware is a modular software stack for edge AI applications, built as a collection of services communicating over Zenoh—a high-performance pub/sub middleware. Each service focuses on a specific task:
- Camera Service: Interfaces with cameras and ISPs, delivers raw frames, handles H.264/H.265/JPEG encoding
- Vision Models: Runs ML inference for object detection, segmentation, and tracking
- LiDAR/Radar Services: Processes point clouds, depth maps, and target tracking
- Fusion Service: Combines data from multiple sensors (camera + LiDAR + radar) for 3D scene understanding
- Recorder: Captures topics to MCAP files for EdgeFirst Studio or Foxglove playback
Services communicate using ROS2 CDR (Common Data Representation) serialization with Zenoh topics, ensuring interoperability with ROS2 tools while leveraging Zenoh's efficiency.
graph LR
camera[Camera Service] --> model[Vision Model]
camera --> fusion[Fusion Service]
lidar[LiDAR Service] --> fusion
radar[Radar Service] --> fusion
model --> fusion
imu[IMU] --> zenoh[Zenoh Topics]
gps[GPS] --> zenoh
camera --> zenoh
model --> zenoh
fusion --> zenoh
lidar --> zenoh
radar --> zenoh
zenoh --> recorder[Recorder] --> mcap[MCAP Files]
zenoh --> apps[Your Applications]
These samples demonstrate how to subscribe to EdgeFirst Perception topics, deserialize messages, and process sensor data in your own applications.
Purpose: Discover and display all available topics on an EdgeFirst device.
This is the simplest starting point—it connects to the Zenoh network and lists all published topics under the rt/ namespace. Use this to verify connectivity and see what data sources are available.
Usage:
# Local discovery
./list-topics
# Remote connection
./list-topics --remote 192.168.1.100:7447Topics Discovered:
rt/camera/image- Camera framesrt/model/boxes2d- Object detection resultsrt/lidar/points- LiDAR point cloudsrt/radar/targets- Radar detections- And many more...
Purpose: Demonstrates the core EdgeFirst Perception workflow—live camera feed with real-time object detection and segmentation.
This is the most comprehensive example, showcasing EdgeFirst's edge vision capabilities. It subscribes to multiple topics simultaneously:
- Camera H.264 stream (
rt/camera/h264) - Decodes and displays live video - Detection boxes (
rt/model/boxes2d) - Overlays bounding boxes on detected objects - Segmentation masks (
rt/model/mask) - Shows pixel-level classification - 3D fusion output (
rt/fusion/boxes3d) - Multi-sensor 3D object tracking (optional) - GPS location (
rt/gps) - Device location on map (optional)
Usage:
# Run with Rerun visualization (recommended)
./mega-sample
# Remote connection
./mega-sample --remote 192.168.1.100:7447What You'll See:
- Real-time video feed from the camera
- Bounding boxes around detected objects (people, vehicles, etc.)
- Segmentation overlay showing classified regions
- 3D point cloud with fused sensor data (if LiDAR/radar enabled)
- GPS map position (if GPS available)
This example shows the power of running vision models at the edge—low-latency ML inference with synchronized multi-sensor fusion, all processed on embedded hardware.
Purpose: Demonstrate different camera topic subscriptions and image handling methods.
Why Separate Examples? While mega-sample shows the complete pipeline, these focused examples help you understand camera-specific topics in isolation.
Source: Rust • Python
Topic: rt/camera/dma
Message: DmaBuf
Linux-only example showing high-performance zero-copy camera access using DMA buffers. This is the fastest way to access camera frames with minimal CPU overhead—ideal for real-time processing.
./camera-dma # Must run on EdgeFirst deviceSource: Rust • Python
Topic: rt/camera/h264
Message: CompressedVideo
Decodes H.264-encoded camera streams. Works remotely and reduces network bandwidth.
./camera-h264 --remote 192.168.1.100:7447Source: Rust • Python
Topic: rt/camera/info
Message: CameraInfo
Retrieves camera calibration and configuration (resolution, distortion parameters, frame rate).
./camera-infoPurpose: Subscribe to vision model outputs (object detection, segmentation, tracking).
These examples focus solely on processing ML inference results without the camera feed, making it easier to understand model output handling.
Source: Rust • Python
Topic: rt/model/boxes2d
Message: BoundingBox2DArray
Displays detected objects with class labels, confidence scores, and bounding box coordinates.
./model-boxesSource: Rust • Python
Topic: rt/model/boxes2d_tracked
Message: BoundingBox2DArray
Shows object tracking with persistent IDs across frames.
./model-boxes_trackedSource: Rust • Python
Topic: rt/model/mask
Message: Mask
Processes pixel-level semantic segmentation results.
./model-maskSource: Rust • Python
Topic: rt/model/compressed_mask
Message: CompressedMask
Handles ZSTD-compressed segmentation masks for reduced bandwidth.
./model-compressed_maskSource: Rust • Python
Topic: rt/model/info
Message: ModelInfo
Retrieves model metadata (name, type, input/output dimensions, class labels).
./model-infoPurpose: Process radar detections, clusters, and range-Doppler-azimuth data.
Source: Rust • Python
Topic: rt/radar/targets
Message: PointCloud2
Displays detected radar targets as 3D points with velocity information.
./radar-targetsSource: Rust • Python
Topic: rt/radar/clusters
Message: PointCloud2
Shows clustered radar detections for object-level tracking.
./radar-clustersSource: Rust • Python
Topic: rt/radar/cube
Message: RadarCube
Processes raw range-Doppler-azimuth radar cube data.
./radar-cubeSource: Rust • Python
Topic: rt/radar/info
Message: RadarInfo
Retrieves radar configuration (range resolution, field of view, update rate).
./radar-infoPurpose: Handle LiDAR point clouds, depth images, and clustering.
Source: Rust • Python
Topic: rt/lidar/points
Message: PointCloud2
Visualizes 3D LiDAR point clouds.
./lidar-pointsSource: Rust • Python
Topic: rt/lidar/depth
Message: Image
Converts LiDAR data to 2D depth map representation.
./lidar-depthSource: Rust • Python
Topic: rt/lidar/clusters
Message: PointCloud2
Shows segmented point cloud clusters (e.g., individual objects or ground plane).
./lidar-clustersSource: Rust • Python
Topic: rt/lidar/reflect
Message: Image
Displays LiDAR intensity/reflectivity data as a 2D image.
./lidar-reflectPurpose: Combine camera, LiDAR, and radar data for comprehensive scene understanding.
Source: Rust • Python
Topic: rt/fusion/boxes3d
Message: BoundingBox3DArray
3D object detections fused from multiple sensors.
./fusion-boxes3dSource: Rust • Python
Topic: rt/fusion/occupancy
Message: OccupancyGrid
2D occupancy map for navigation and obstacle avoidance.
./fusion-occupancySource: Rust • Python
Topic: rt/fusion/model_output
Message: Detect
Combined detection results from vision models and sensor fusion.
./fusion-model-outputSource: Rust • Python
Topic: rt/fusion/radar
Message: PointCloud2
Radar data transformed into camera coordinate frame.
./fusion-radarSource: Rust • Python
Topic: rt/fusion/lidar
Message: PointCloud2
LiDAR point cloud projected into camera perspective.
./fusion-lidarPurpose: Access inertial measurement and positioning data.
Source: Rust • Python
Topic: rt/imu
Message: Imu
Reads accelerometer, gyroscope, and orientation data.
./imuSource: Rust • Python
Topic: rt/gps
Message: NavSatFix
Displays GPS latitude/longitude coordinates and fix quality.
./gpsMost examples support visualization using the Rerun framework, providing:
- On-device or remote visualization
- Recording for later playback (
.rrdfiles) - Time-series and spatial data views
- Multi-sensor synchronized visualization
Enable Rerun with the --features rerun flag when building Rust examples.
Alternative integrations:
- MCAP Recorder: Record topics to MCAP files → Documentation
- Foxglove Studio: ROS2-compatible visualization → Guide
- EdgeFirst Studio: Publish recordings for MLOps workflows → Platform
- Maivin WebUI: JavaScript/HTML interface → GitHub
Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shPython:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtgit clone https://github.com/EdgeFirstAI/samples.git
cd samples
# Build all Rust examples (release mode)
cargo build --release --all-targets
# Build with Rerun visualization support
cargo build --release --all-targets --features rerun
# Run any example
cargo run --bin list-topics --release
# Python examples (no build required)
python python/list_topics.py# Linux aarch64 cross-compilation
rustup target add aarch64-unknown-linux-gnu
cargo build --release --target aarch64-unknown-linux-gnu
# macOS Apple Silicon
cargo build --release --target aarch64-apple-darwin
# Windows
cargo build --release --target x86_64-pc-windows-msvc- Architecture Guide - In-depth technical overview
- Contributing Guidelines - How to contribute
- Security Policy - Vulnerability reporting
- EdgeFirst Developer Guide - Official documentation
- Platform Documentation - Supported platforms
| Category | Rust Examples | Python Examples | Description |
|---|---|---|---|
| Discovery | list-topics |
list_topics.py |
Topic discovery |
| Combined | mega-sample |
combined/mega_sample.py |
Complete vision pipeline demo |
| Camera | camera-dma, camera-h264, camera-info |
camera/dma.py, camera/h264.py, camera/camera_info.py |
Camera streams and calibration |
| ML Models | model-boxes, model-mask, model-boxes_tracked, model-info |
model/boxes2d.py, model/mask.py, model/boxes2d_tracked.py |
Object detection, segmentation, tracking |
| Radar | radar-targets, radar-clusters, radar-cube, radar-info |
radar/targets.py, radar/clusters.py, radar/cube.py |
Radar detections and processing |
| LiDAR | lidar-points, lidar-depth, lidar-clusters, lidar-reflect |
lidar/points.py, lidar/depth.py, lidar/clusters.py |
Point clouds and depth imaging |
| Fusion | fusion-boxes3d, fusion-occupancy, fusion-lidar, fusion-radar, fusion-model-output |
fusion/boxes3d.py, fusion/occupancy.py, fusion/lidar.py |
Multi-sensor integration |
| Navigation | imu, gps |
imu.py, gps.py |
Inertial and positioning data |
- GitHub Discussions: Ask questions and share ideas
- GitHub Issues: Report bugs and request features
- Documentation: https://doc.edgefirst.ai/
- Code of Conduct: See CODE_OF_CONDUCT.md
- EdgeFirst Studio: MLOps platform for edge AI model deployment
- EdgeFirst Modules: Pre-built perception modules
- Hardware Platforms:
- Maivin: Edge AI development platform
- Raivin: Automotive-grade edge AI platform
Au-Zone Technologies offers commercial support services:
- Training & Workshops: EdgeFirst development training
- Custom Development: Tailored perception pipelines
- Integration Services: Platform-specific integration
- Enterprise Support: Priority support and SLAs
Contact: support@au-zone.com
We welcome contributions! Please see CONTRIBUTING.md for:
- Development setup instructions
- Code style guidelines
- Pull request process
- Testing requirements
All contributors must adhere to our Code of Conduct.
For security vulnerability reports, please see our Security Policy.
Do not report security issues via public GitHub issues.
This project is licensed under the Apache License 2.0 - see LICENSE for details.
Copyright © 2025 Au-Zone Technologies. All Rights Reserved.
Third-party dependencies are listed in NOTICE with their respective licenses.
Built with:
- Zenoh - High-performance pub/sub middleware
- Rerun - Visualization framework
- Rust - Systems programming language
- The EdgeFirst team and open source contributors
EdgeFirst is a trademark of Au-Zone Technologies.
For more information, visit https://au-zone.com/