Skip to content

Commit 3627d44

Browse files
Merge pull request #2141 from jasonrandrews/review
First review of Zenoh Learning Path
2 parents e6cd7ef + 1af8d5a commit 3627d44

File tree

8 files changed

+154
-151
lines changed

8 files changed

+154
-151
lines changed

content/learning-paths/cross-platform/zenoh-multinode-ros2/1_intro-zenoh.md

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,43 @@ layout: learningpathall
88

99
## The Need for Scalable Communication in Robotics and Edge Computing
1010

11-
Modern robotics and industrial IoT (IIoT) systems are evolving rapidlyfrom indoor collaborative arms on assembly lines to fleets of outdoor autonomous delivery robots.
11+
Modern robotics and industrial IoT systems are evolving rapidly, from indoor collaborative arms on assembly lines to fleets of outdoor autonomous delivery robots.
1212
These applications must operate in real-time, often across multiple compute nodes, over networks that may span factory LANs, 5G cellular links, or even cloud data centers.
1313

1414
Such systems require fast, reliable, and scalable data communication between nodes.
15-
This includes not just broadcasting sensor updates or actuator commands (i.e., pub/sub), but also performing state queries, storing values for later use, and even distributed computation across nodes. A modern protocol must be:
15+
This includes not just broadcasting sensor updates or actuator commands (pub/sub), but also performing state queries, storing values for later use, and even distributed computation across nodes.
16+
17+
A modern protocol must be:
1618
* Low-latency: Immediate delivery of time-critical messages.
1719
* High-throughput: Efficient data flow across many devices.
1820
* Decentralized: No reliance on central brokers or fixed infrastructure.
1921
* Flexible: Able to run on lightweight edge devices, across WANs, or inside cloud-native environments.
2022

21-
Traditional communication stacks such as DDS ([Data Distribution Service](https://en.wikipedia.org/wiki/Data_Distribution_Service)) serve as the backbone for middleware like ROS 2. However, DDS struggles in multi-network or wireless environments where multicast is unavailable, or NAT traversal is needed.
23+
Traditional communication stacks such as Data Distribution Service (DDS) serve as the backbone for middleware like ROS 2. However, DDS struggles in multi-network or wireless environments where multicast is unavailable, or NAT traversal is needed.
2224
These constraints can severely impact deployment and performance at the edge.
2325

2426

25-
## Zenoh: An Open-Source Pub/Sub Protocol for the Industrial Edge
27+
## Zenoh: an open-source pub/sub protocol for the Industrial Edge
2628

27-
[Eclipse Zenoh](https://zenoh.io/) is a modern, [open-source](https://github.com/eclipse-zenoh/zenoh) data-centric communication protocol that goes beyond traditional pub/sub. Designed specifically for edge computing, IIoT, robotics, and autonomous systems, Zenoh unifies:
29+
[Eclipse Zenoh](https://zenoh.io/) is a modern, open-source, data-centric communication protocol that goes beyond traditional pub/sub. Designed specifically for edge computing, industrial IoT, robotics, and autonomous systems, Zenoh unifies:
2830

29-
* Data in motion through a powerful and efficient pub/sub model.
30-
* Data at rest via geo-distributed storage plugins.
31-
* Data in use with direct query support.
32-
* On-demand computation via queryable nodes that can generate data dynamically.
31+
- Data in motion through a powerful and efficient pub/sub model.
32+
- Data at rest via geo-distributed storage plugins.
33+
- Data in use with direct query support.
34+
- On-demand computation via queryable nodes that can generate data dynamically.
3335

3436
Unlike most traditional stacks, Zenoh is fully decentralized and designed to operate across cloud-to-edge-to-thing topologies, making it ideal for industrial robotics, autonomous systems, and smart environments.
37+
3538
It supports heterogeneous platforms, is implemented in Rust for performance and safety, and also offers bindings for Python, enabling rapid prototyping.
3639

3740
Zenoh is particularly effective in wireless, 5G, or cross-network deployments where multicast and DDS fall short.
38-
Its routing engine avoids excessive discovery traffic, conserves bandwidth, and supports seamless bridging between legacy ROS 2/DDS apps and modern, optimized Zenoh networks using zenoh-bridge-dds.
39-
40-
In this learning path, you’ll use Zenoh to build and validate a multi-node distributed communication system across multiple Arm-based platforms, gaining hands-on experience with data exchange and coordination between edge devices.
41-
42-
To make the upcoming demo more intuitive and easy to follow, we’ll demonstrate the setup using two physical Cortex-A Linux devices.
43-
44-
I’ll be using Raspberry Pi boards in this learning path, but you’re free to substitute them with any Cortex-A devices that support network connectivity with Linux-based OS installed, depending on your development setup.
45-
46-
In real-world ROS 2 deployment scenarios, developers typically conduct validation and performance testing across systems with more than two nodes.
47-
To simulate such environments, using [Arm virtual hardware](https://www.arm.com/products/development-tools/simulation/virtual-hardware) is also a common and efficient approach.
48-
49-
This will help you quickly validate your architecture choices and communication patterns when designing distributed applications.
50-
51-
* Raspberry Pi,
52-
* Linux-based Cortex-A, or
53-
* Arm Virtual Hardware (AVH).
41+
Its routing engine avoids excessive discovery traffic, conserves bandwidth, and supports seamless bridging between legacy ROS 2/DDS apps and modern, optimized Zenoh networks using Zenoh-Bridge-DDS, a bridge between DDS systems and Zenoh networks.
5442

55-
After this learning path, you will:
56-
* Understand the core architecture and data flow principles behind Eclipse Zenoh, including its support for pub/sub, querying, and queryable edge functions.
57-
* Build and run distributed Zenoh examples across multiple Arm-based nodes—using Raspberry Pi or AVH to simulate scalable deployment environments.
58-
* Rebuild and extend the Zenoh queryable example to simulate edge-side logic.
43+
In this Learning Path, you’ll use Zenoh to build and validate a multi-node distributed communication system across multiple Arm-based platforms, gaining hands-on experience with data exchange and coordination between edge devices.
5944

60-
By the end of this learning path, you’ll have deployed a fully functional, scalable, and latency-aware Zenoh system.
45+
The examples use Raspberry Pi boards, but you’re free to substitute any Cortex-A or Neoverse devices that support network connectivity running Linux.
6146

62-
You can also check [here](https://zenoh.io/docs/getting-started/first-app) to find some simple examples.
47+
Upon completion, you will be able to:
48+
- Understand the core architecture and data flow principles behind Eclipse Zenoh, including its support for pub/sub, querying, and queryable edge functions.
49+
- Build and run distributed Zenoh examples across multiple Arm-based nodes using Raspberry Pi or other Arm Linux devices.
50+
- Rebuild and extend the Zenoh queryable example to simulate edge-side logic.

content/learning-paths/cross-platform/zenoh-multinode-ros2/2_zenoh-install.md

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,59 @@ layout: learningpathall
88

99
## Setting Up Zenoh on Arm Devices
1010

11-
The following instructions are verified on both Raspberry Pi 4/5 and Arm Virtual Hardware, but you can implement them on any Cortex-A Linux device.
11+
The following instructions have been verified on both Raspberry Pi 4 and 5 devices, but you can implement them on any Arm Linux device.
1212

1313
Before building Zenoh, make sure your system has the necessary development tools and runtime libraries.
1414

15-
### Install the Rust build environment
15+
### Install the Rust development environment
1616

17-
First, we need to install the [Rust](https://www.rust-lang.org/) build environment, since the core of Zenoh is totally developed using Rust to keep it safe and efficient.
18-
19-
Follow this [installation guide](https://learn.arm.com/install-guides/rust/) to install Rust and Cargo on Arm Linux, a build system for Rust. Or, simply use the following commands.
17+
First, install the [Rust](https://www.rust-lang.org/) environment, since the core of Zenoh is developed using Rust to keep it safe and efficient.
2018

2119
```bash
22-
curl https://sh.rustup.rs -sSf | sh
20+
sudo apt update
21+
sudo apt install -y curl gcc
22+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
2323
```
2424

25-
Follow the prompts to complete the installation. If successful, you’ll see:
25+
Near the end of the installation you will see the success message:
2626

2727
```output
2828
Rust is installed now. Great!
2929
```
3030

31-
For more details, refer to [Rust’s official install guide.](https://doc.rust-lang.org/cargo/getting-started/installation.html#install-rust-and-cargo)
31+
Make sure to source the environment to add Rust to your shell environment:
3232

33-
### Install ROS 2
33+
```bash
34+
source "$HOME/.cargo/env"
35+
```
3436

35-
[Robot Operating System](https://www.ros.org/) is a set of software libraries and tools that help you build robot applications. From drivers to state-of-the-art algorithms, and with powerful developer tools, ROS has what you need for your next robotics project. And it's all open source.
37+
You can learn more using the [Rust install guide](/install-guides/rust/) for Arm Linux.
3638

37-
Since ROS was started in 2007, a lot has changed in the robotics and ROS community. The goal of the [ROS 2](https://docs.ros.org/en/rolling/index.html) project is to adapt to these changes, leveraging what is great about ROS 1 and improving what isn’t.
39+
### Install ROS 2
3840

39-
Here is the quick [installation guide](https://learn.arm.com/install-guides/ros2/) about how to install ROS 2 in Arm platform.
41+
[Robot Operating System](https://www.ros.org/) is a set of software libraries and tools that help you build robot applications. ROS provides everything from drivers to state-of-the-art algorithms, as well as developer tools. It is completely open-source.
42+
43+
Follow the [ROS2 installation guide](/install-guides/ros2/) to install ROS 2 on your Arm platforms.
4044

4145
### Download and build the Zenoh source
4246

43-
Now, we can clone the Zenoh.
47+
Clone the Zenoh repository:
4448

4549
```bash
46-
cd ~
50+
cd $HOME
4751
git clone https://github.com/eclipse-zenoh/zenoh.git
4852
```
4953

50-
After that, simply use cargo to build the source.
54+
After cloning, use cargo to build the source:
5155

5256
```bash
5357
cd zenoh
5458
cargo build --release --all-targets -j $(nproc)
5559
```
5660

57-
This will take several minutes depending on your device. Once the installation is complete, you should see:
61+
This process will take several minutes depending on your device. Once the installation is complete, you should see:
5862

5963
```output
60-
cargo build --release --all-targets -j $(nproc)
6164
Updating crates.io index
6265
Downloaded humantime v2.2.0
6366
Downloaded spin v0.10.0
@@ -101,7 +104,26 @@ This may become a hard error in the future; see <https://github.com/rust-lang/ca
101104
After the build process, the binary executables will be stored under the directory of `~/zenoh/target/release/examples/`.
102105

103106
{{% notice Note %}}
104-
Installation time may vary depending on your device’s processing power.
107+
Installation time may vary depending on your device’s performance.
105108
{{% /notice %}}
106109

110+
If you get a build error:
111+
```output
112+
error[E0599]: no function or associated item named `start` found for struct `StoragesPlugin` in the current scope
113+
--> plugins/zenoh-plugin-storage-manager/tests/operations.rs:91:55
114+
```
115+
116+
Edit the file `./plugins/zenoh-plugin-storage-manager/tests/operations.rs` and comment the line shown below and add the second line to the file:
117+
118+
```rust
119+
//use zenoh_plugin_trait::Plugin;
120+
use crate::path::to::Plugin;
121+
```
122+
123+
Run the build again:
124+
125+
```bash
126+
cargo clean && cargo build
127+
```
128+
107129
With Zenoh successfully compiled, you’re ready to explore how nodes communicate using the Zenoh runtime.

content/learning-paths/cross-platform/zenoh-multinode-ros2/3_zenoh-multinode.md

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,26 @@ layout: learningpathall
1010

1111
After building Zenoh and its core examples, your next step is to deploy them across multiple Arm-based devices.
1212

13-
In this session, you’ll use Raspberry Pi boards to simulate a scalable, distributed environmentbut the same workflow applies to any Arm Linux system, including Arm cloud instances and Arm Virtual Hardware.
13+
In this section, you’ll use Raspberry Pi boards to simulate a scalable, distributed environment, but the same workflow applies to any Arm Linux system, including Arm cloud instances.
1414

15-
You’ll learn how to use Docker to deploy the environment on physical devices, and how to duplicate virtual instances using snapshot cloning on Arm Virtual Hardware.
15+
You’ll learn how to use Docker to deploy the environment on physical devices.
1616

17-
This setup lets you simulate `real-world`, `cross-node communication`, making it ideal for validating Zenoh's performance in robotics and industrial IoT use cases.
17+
This setup lets you simulate real-world, cross-node communication, making it ideal for validating Zenoh's performance in robotics and industrial IoT use cases.
1818

19-
### Install Docker on Raspberry Pi
19+
### Install Docker
2020

21-
To simplify this process and ensure consistency, you’ll use Docker to containerize your Zenoh and ROS 2 environment.
21+
To simplify this process and ensure consistency, you can use Docker to containerize your Zenoh and ROS 2 environment.
2222
This lets you quickly replicate the same runtime on any device without needing to rebuild from source.
2323

2424
This enables multi-node testing and real-world distributed communication scenarios.
2525

26-
First, install the docker environment on each of Raspberry Pi if you don't have that.
26+
First, install Docker on each of Raspberry Pi.
2727

2828
```bash
29-
curl -sSL https://get.docker.com | sh
30-
sudo usermod -aG docker pi
29+
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
30+
sudo usermod -aG docker $USER ; newgrp docker
3131
```
3232

33-
Log out and back in, or run newgrp docker to activate Docker group permissions.
34-
3533
### Create a ROS 2 + DDS Docker Image
3634

3735
In a working directory, create a `Dockerfile` with the following content to create the ROS 2 / DDS docker image.
@@ -47,24 +45,22 @@ CMD bash
4745
Under the directory where the above Dockerfile exists, run the following command to generate the docker image.
4846

4947
```bash
50-
$ docker build -t zenoh-node .
48+
docker build -t zenoh-node .
5149
```
5250

53-
After this has been done, the created ROS 2 docker image can be seen by the following command.
51+
After this has been done, the created ROS 2 Docker image can be seen by the following command.
5452

5553
```bash
56-
$ docker images | grep zenoh-node
54+
docker images | grep zenoh-node
5755
```
5856

5957
```output
6058
zenoh-node latest b7a9c27cf8a8 About a minute ago 962MB
6159
```
6260

63-
### Transfer the Docker Image on Another RPi
64-
65-
You now need to transfer the Docker image to your second device. Choose one of the following methods:
61+
### Transfer the Docker image to the other Raspberry Pi
6662

67-
You have two options:
63+
There are two options to transfer the Docker image to your second device. Choose one of the following methods.
6864

6965
Option 1: Save and copy via file
7066

@@ -74,31 +70,24 @@ scp zenoh-node.tar pi@<target_ip>:/home/pi/
7470
```
7571

7672
On the target device:
73+
7774
```bash
7875
docker load < zenoh-node.tar
7976
```
8077

81-
Option 2: Push to a container registry (e.g., DockerHub or GHCR).
78+
Option 2: Push the image to a container registry such as Docker Hub
8279

8380
You can also push the image to Docker Hub or GitHub Container Registry and pull it on the second device.
8481

8582
### Run the Docker Image
8683

87-
Once the image is successfully loaded into second device, you can run the container by
84+
Once the image is successfully loaded on second device, you can run the container.
8885

8986
```bash
9087
docker run -it --network=host zenoh-node
9188
```
9289

93-
Now, all the Zenoh example binaries are now available within this container, allowing you to test pub/sub and query flows across devices.
94-
95-
### Another Duplicate Setting Option on Arm Virtual Hardware
96-
97-
If you have [Corellium](https://www.corellium.com/) account, you can
98-
99-
1. Set up and install Zenoh on a single AVH instance.
100-
2. Use the [Clone](https://support.corellium.com/features/snapshots) function to duplicate the environment.
101-
3. Optionally, you may optionally rename the device to avh* for easy device recognition by changing the setting in the `/etc/hostname` file.
90+
The Zenoh example binaries are now available within this container, allowing you to test pub/sub and query flows across devices.
10291

10392
## Run Zenoh in Multi-Node Environment
10493

content/learning-paths/cross-platform/zenoh-multinode-ros2/4_zenoh-ex1-pubsub.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,36 @@ weight: 5
66
layout: learningpathall
77
---
88

9-
## Example 1: Simple Pub/Sub
9+
## Example 1: Simple pub/sub
1010

11-
This first test demonstrates real-time publish/subscribe model using two Raspberry Pi devices.
11+
This first test demonstrates the real-time publish/subscribe model using two Raspberry Pi devices.
1212

13-
The following command is to initiate a subscriber for a key expression `demo/example/**`, i.e. a set of topics starting with the path `demo/example`.
13+
The following command is to initiate a subscriber for a key expression `demo/example/**`, a set of topics starting with the path `demo/example`.
1414

15-
### Step 1: Run Subscriber
15+
### Step 1: Run subscriber
1616

17-
Log in to Pi using any of the methods:
17+
Run the subscriber example on one of the Raspberry Pi systems.
1818

1919
```bash
2020
cd ~/zenoh/target/release/examples
2121
./z_sub
2222
```
2323

24-
### Step 2: Run Publisher
24+
### Step 2: Run publisher
2525

26-
Then, log in to another machine Pi.
26+
Then, log in to the other Raspberry Pi and run the publisher.
2727

2828
```bash
2929
cd ~/zenoh/target/release/examples
3030
./z_pub
3131
```
3232

33-
The result will look like:
33+
The result is shown below:
34+
3435
![img1 alt-text#center](zenoh_ex1.gif "Figure 1: Simple Pub/Sub")
3536

36-
In the left-side window, I have logged into the device Pi4 and run the z_sub program.
37-
It receives values with the key `demo/example/zenoh-rs-pub` continuously published by z_pub running on Pi in the right-side window.
37+
The left-side window shows the `z_sub` program.
38+
39+
It receives values with the key `demo/example/zenoh-rs-pub` continuously published by `z_pub` running in the right-side window.
3840

3941
This basic example shows Zenoh's zero-config discovery and low-latency pub/sub across physical nodes.

0 commit comments

Comments
 (0)