By the end of this guide, you’ll have a camera publisher sending images to a display subscriber — communicating via zero-copy shared memory with sub-microsecond latency.
Prerequisites
Cerulion installed — run
cerulion doctor to verifyWhat You’ll Build
A simple two-node pipeline: camera_pub publishes images that display_sub receives- camera_pub — Publishes an
Imageevery 100ms - display_sub — Receives images and renders them
Step 1: Create a Workspace
Step 2: Create the Nodes
Your workspace now looks like:
my_robot_workspace
graphs
nodes
camera_pub
Cargo.toml
camera_pub.rs
display_sub
Cargo.toml
display_sub.rs
Cargo.toml
Step 3: Write the Node Code
- camera_pub.rs
- display_sub.rs
Open
nodes/camera_pub/camera_pub.rs and replace its contents:nodes/camera_pub/camera_pub.rs
Image is a built-in ROS2-compatible message type. Cerulion provides all standard ROS2 message primitives.Step 4: Create the Graph
Step 5: Run It
What Just Happened?
Zero-Copy Transport
Images flow through shared memory. No serialization, no copying — the subscriber reads directly from where the publisher wrote.
Sub-μs Latency
The
image message reaches the subscriber in under 1 microsecond. That’s 1000x faster than network transport.Automatic Scheduling
camera_pub runs every 100ms automatically. display_sub triggers only when new data arrives.Type-Safe Messages
Image is validated at compile time. Schema mismatches are caught before you run.Next Steps
CLI Commands
Full command reference
Pub/Sub Deep Dive
Advanced messaging patterns
Wireformat Messages
All available message types
Troubleshooting
Graph fails to start
Graph fails to start
Check your
launch.crln wiring:source_nodemust match a nodeidin the same filesource_output_namemust match an#[out("name")]in the source nodenamemust match a parameter name in the target node
Build fails with missing dependency
Build fails with missing dependency
Ensure you have Rust installed and up to date:Then rebuild:
cerulion doctor shows iceoryx2 not ready
cerulion doctor shows iceoryx2 not ready
Shared memory requires proper permissions. On Linux:On macOS, this usually works out of the box. If not, try restarting your terminal.
TUI doesn't show any topics
TUI doesn't show any topics
Make sure your graph is running in another terminal:Topics only appear when nodes are actively publishing.