You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/zenoh-multinode-ros2/2_zenoh-install.md
+31-22Lines changed: 31 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ weight: 3
6
6
layout: learningpathall
7
7
---
8
8
9
-
### Installation: Setting Up Zenoh on Arm Devices
9
+
## Setting Up Zenoh on Arm Devices
10
10
11
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.
12
12
13
13
Before building Zenoh, make sure your system has the necessary development tools and runtime libraries.
14
14
15
-
####Install the Rust build environment
15
+
### Install the Rust build environment
16
16
17
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
18
@@ -30,16 +30,15 @@ Rust is installed now. Great!
30
30
31
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)
32
32
33
-
####Install ROS 2
33
+
### Install ROS 2
34
34
35
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.
36
36
37
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.
38
38
39
39
Here is the quick [installation guide](https://learn.arm.com/install-guides/ros2/) about how to install ROS 2 in Arm platform.
40
40
41
-
42
-
## Download and build the Zenoh source
41
+
### Download and build the Zenoh source
43
42
44
43
Now, we can clone the Zenoh.
45
44
@@ -59,35 +58,44 @@ This will take several minutes depending on your device. Once the installation i
59
58
60
59
```output
61
60
cargo build --release --all-targets -j $(nproc)
61
+
Updating crates.io index
62
+
Downloaded humantime v2.2.0
63
+
Downloaded spin v0.10.0
64
+
Downloaded crossbeam-channel v0.5.14
65
+
Downloaded uhlc v0.8.1
66
+
Downloaded 4 crates (182.5 KB) in 2.19s
62
67
warning: output filename collision.
63
-
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)`.
64
-
Colliding filename is: /home/ubuntu/zenoh/zenoh/target/release/deps/libzenoh_plugin_storage_manager.so
68
+
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)`.
69
+
Colliding filename is: /home/ubuntu/zenoh/target/release/deps/libzenoh_plugin_storage_manager.so
65
70
The targets should have unique names.
66
71
Consider changing their names to be unique or compiling them separately.
67
72
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
68
73
warning: output filename collision.
69
-
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)`.
70
-
Colliding filename is: /home/ubuntu/zenoh/zenoh/target/release/deps/libzenoh_plugin_storage_manager.so.dwp
74
+
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)`.
75
+
Colliding filename is: /home/ubuntu/zenoh/target/release/deps/libzenoh_plugin_storage_manager.so.dwp
71
76
The targets should have unique names.
72
77
Consider changing their names to be unique or compiling them separately.
73
78
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
74
79
warning: output filename collision.
75
-
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.3.0 (/home/ubuntu/zenoh/zenoh/plugins/zenoh-plugin-storage-manager)`.
76
-
Colliding filename is: /home/ubuntu/zenoh/zenoh/target/release/deps/libzenoh_plugin_storage_manager.rlib
80
+
The lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)` has the same output filename as the lib target `zenoh_plugin_storage_manager` in package `zenoh-plugin-storage-manager v1.4.0 (/home/ubuntu/zenoh/plugins/zenoh-plugin-storage-manager)`.
81
+
Colliding filename is: /home/ubuntu/zenoh/target/release/deps/libzenoh_plugin_storage_manager.rlib
77
82
The targets should have unique names.
78
83
Consider changing their names to be unique or compiling them separately.
79
84
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/zenoh-multinode-ros2/3_zenoh-multinode.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
-
title: Setup Multi-Node Environment
2
+
title: Setting Up a Multi-Node Environment
3
3
weight: 4
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
###Deploying Zenoh on Multiple Raspberry Pi Devices Using Docker
9
+
## Deploying Zenoh on Multiple Raspberry Pi Devices Using Docker
10
10
11
11
After building Zenoh and its core examples, your next step is to deploy them across multiple Arm-based devices.
12
12
@@ -16,7 +16,7 @@ You’ll learn how to use Docker to deploy the environment on physical devices,
16
16
17
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.
18
18
19
-
####Install Docker on Raspberry Pi
19
+
### Install Docker on Raspberry Pi
20
20
21
21
To simplify this process and ensure consistency, you’ll use Docker to containerize your Zenoh and ROS 2 environment.
22
22
This lets you quickly replicate the same runtime on any device without needing to rebuild from source.
@@ -32,7 +32,7 @@ sudo usermod -aG docker pi
32
32
33
33
Log out and back in, or run newgrp docker to activate Docker group permissions.
34
34
35
-
####Create a ROS 2 + DDS Docker Image
35
+
### Create a ROS 2 + DDS Docker Image
36
36
37
37
In a working directory, create a `Dockerfile` with the following content to create the ROS 2 / DDS docker image.
38
38
@@ -47,55 +47,58 @@ CMD bash
47
47
Under the directory where the above Dockerfile exists, run the following command to generate the docker image.
48
48
49
49
```bash
50
-
$ docker build -t ros2-docker.
50
+
$ docker build -t zenoh-node.
51
51
```
52
52
53
53
After this has been done, the created ROS 2 docker image can be seen by the following command.
54
54
55
55
```bash
56
-
$ docker images | grep ros2-docker
56
+
$ docker images | grep zenoh-node
57
57
```
58
58
59
59
```output
60
-
ros2-docker latest b7a9c27cf8a8 About a minute ago 962MB
60
+
zenoh-node latest b7a9c27cf8a8 About a minute ago 962MB
61
61
```
62
62
63
-
####Transfer the Docker Image on Another RPi
63
+
### Transfer the Docker Image on Another RPi
64
64
65
65
You now need to transfer the Docker image to your second device. Choose one of the following methods:
66
66
67
-
There are two of option you can do:
67
+
You have two options:
68
68
69
69
Option 1: Save and copy via file
70
70
71
71
```bash
72
-
docker save ros2-docker>ros2-docker.tar
73
-
scp ros2-docker.tar pi@<target_ip>:/home/pi/
72
+
docker save zenoh-node>zenoh-node.tar
73
+
scp zenoh-node.tar pi@<target_ip>:/home/pi/
74
74
```
75
75
76
76
On the target device:
77
77
```bash
78
-
docker load <ros2-docker.tar
78
+
docker load <zenoh-node.tar
79
79
```
80
80
81
81
Option 2: Push to a container registry (e.g., DockerHub or GHCR).
82
82
83
83
You can also push the image to Docker Hub or GitHub Container Registry and pull it on the second device.
84
84
85
-
####Run the Docker Image
85
+
### Run the Docker Image
86
86
87
-
Once you success load the image into second device, you can run the container by
87
+
Once the image is successfully loaded into second device, you can run the container by
88
88
89
89
```bash
90
90
docker run -it --network=host zenoh-node
91
91
```
92
92
93
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
94
95
-
### Another Duplicate Settup Option on Arm Virtual Hardware RPi devices (Optional)
95
+
### Another Duplicate Setting Option on Arm Virtual Hardware
96
96
97
97
If you have [Corellium](https://www.corellium.com/) account, you can
98
98
99
99
1. Set up and install Zenoh on a single AVH instance.
100
100
2. Use the [Clone](https://support.corellium.com/features/snapshots) function to duplicate the environment.
101
101
3. Optionally, you may optionally rename the device to avh* for easy device recognition by changing the setting in the `/etc/hostname` file.
102
+
103
+
104
+
With your multi-node environment in place, you’re now ready to run and test Zenoh communication flows across distributed edge devices.
In the left-side window, I have logged into the device Pi4 and run the z_sub program.
@@ -50,7 +50,7 @@ It receives values with the key `demo/example/zenoh-rs-pub` continuously publish
50
50
This basic example shows Zenoh’s zero-config discovery and low-latency pub/sub across physical nodes.
51
51
52
52
53
-
###Example 2: Storage and Query
53
+
## Example 2: Storage and Query
54
54
55
55
Building on the previous Pub/Sub example, you’ll now explore how Zenoh supports `persistent data storage` and `on-demand querying` -- a powerful feature for robotics and IIoT applications.
56
56
@@ -63,7 +63,7 @@ In this example, you’ll run the zenohd daemon with in-memory storage and use z
63
63
This is especially useful for distributed systems where nodes may intermittently connect or request snapshots of state from peers.
64
64
65
65
66
-
####Step 1: Start the Zenoh Daemon with In-Memory Storage
66
+
### Step 1: Start the Zenoh Daemon with In-Memory Storage
67
67
68
68
On one Raspberry Pi, launch the Zenoh daemon with a configuration that enables in-memory storage for keys under demo/example/**:
69
69
@@ -77,7 +77,7 @@ This starts the Zenoh daemon with in-memory storage support.
77
77
You should see log messages indicating that the storage_manager plugin is loaded.
78
78
If port 7447 is already in use, either stop any previous Zenoh processes or configure a custom port using the listen.endpoints.router setting.
79
79
80
-
####Step 2: Publish Data
80
+
### Step 2: Publish Data
81
81
82
82
On 2nd device, use z_put to send a key-value pair that will be handled by the zenohd storage:
83
83
@@ -89,20 +89,20 @@ cd ~/zenoh/target/release/examples
89
89
This command stores the string `Hello from storage!` under the key demo/example/test1.
90
90
91
91
92
-
####Step 3: Query the Data
92
+
### Step 3: Query the Data
93
93
94
94
Back on first Raspberry Pi, you can now query the stored data from any Zenoh-connected node:
95
95
96
96
```bash
97
97
cd~/zenoh/target/release/examples
98
-
./z_put -s demo/example/test1"Hello from storage!"
98
+
./z_get -s demo/example/test1
99
99
```
100
100
101
101
You should see an output similar to:
102
102
103
103
```bash
104
-
Sending Query 'demo/example/example2'...
105
-
>> Received ('demo/example/example2': 'Hello from storage!')
104
+
Sending Query 'demo/example/test1'...
105
+
>> Received ('demo/example/test1': 'Hello from storage!')
106
106
```
107
107
108
108
{{% notice tip %}}
@@ -112,19 +112,19 @@ If you have more than two Raspberry Pi devices, you can run the z_get command on
112
112
This example shows how Zenoh’s Storage + Query model supports asynchronous data access and resilient state-sharing—critical capabilities in robotics and industrial IoT systems where network connectivity may be intermittent or system components loosely coupled.
113
113
114
114
115
-
###Example 3: Computation on Query using Queryable
115
+
## Example 3: Computation on Query using Queryable
116
116
117
117
In this final example, you’ll explore Zenoh’s queryable capability, which lets a node dynamically respond to data queries by executing a custom computation or data generation function.
118
118
119
119
Unlike zenohd which simply returns stored data, a queryable node can register to handle a specific key expression and generate responses at runtime. This is ideal for distributed computing at the edge, where lightweight devices—such as Raspberry Pi nodes—can respond to requests with calculated values (e.g., sensor fusion, AI inference results, or diagnostics).
120
120
121
-
####Use Case: On-Demand Battery Health Estimation
121
+
### Use Case: On-Demand Battery Health Estimation
122
122
123
123
Imagine a robot fleet management system where the central planner queries each robot for its latest battery health score, which is not published continuously but calculated only when queried.
124
124
125
125
This saves bandwidth and enables edge compute optimization using Zenoh’s Queryable.
126
126
127
-
####Step 1: Launch a Queryable Node
127
+
### Step 1: Launch a Queryable Node
128
128
129
129
On one Raspberry Pi device, run the built-in Zenoh example to register a queryable handler.
130
130
@@ -144,7 +144,7 @@ Press CTRL-C to quit...
144
144
145
145
The node is now ready to accept queries on the key demo/example/zenoh-rs-queryable and respond with a predefined message.
146
146
147
-
####Step 2: Trigger a Query from Another Node
147
+
### Step 2: Trigger a Query from Another Node
148
148
149
149
On another Raspberry Pi device or terminal, run:
150
150
@@ -156,19 +156,21 @@ cd ~/zenoh/target/release/examples
0 commit comments