
- From Scratch
- From ROS2
You’ll build a two-node pipeline — a camera publisher sending images to a display subscriber via zero-copy shared memory.
Prerequisites
Cerulion installed — see the Installation guide if not
What You’ll Build
A simple two-node pipeline:- 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. See Wireformat Messages for the full list of included types.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.
~60 ns Latency
The
image message reaches the subscriber in ~60 ns via shared memory. That’s 100,000x faster than ROS2’s default DDS for local Image 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.How zero-copy works: Think of a whiteboard in a shared office — the publisher writes on the board, and the subscriber reads it in place. Nobody makes a photocopy.
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:
iceoryx2 shared memory fails to start
iceoryx2 shared memory fails to start
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.