Skip to content

Commit 8fee23e

Browse files
committed
Address feedback
1 parent 7c75cc8 commit 8fee23e

8 files changed

Lines changed: 23 additions & 54 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/device-connect-strands/_index.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ learning_objectives:
1616
- Discover and invoke the robot using the Device Connect agent tools and the robot_mesh Strands tool
1717

1818
prerequisites:
19-
- A development machine with Python 3.12 installed
20-
- Git installed
21-
- Basic familiarity with Python virtual environments and command-line tools
19+
- A development machine with git installed
20+
- Basic familiarity with command-line tools
2221
- (Optional) A Raspberry Pi for testing a full device-to-device (D2D) setup
2322

2423
author:
@@ -48,11 +47,7 @@ further_reading:
4847
type: website
4948
- resource:
5049
title: Strands robots repository
51-
link: https://github.com/strands-labs/robots/tree/dev
52-
type: website
53-
- resource:
54-
title: Device Connect integration guide
55-
link: https://github.com/atsyplikhin/robots/blob/feat/device-connect-integration-draft/strands_robots/device_connect/GUIDE.md
50+
link: https://github.com/strands-labs/robots
5651
type: website
5752
- resource:
5853
title: device-connect-agent-tools on PyPI

content/learning-paths/embedded-and-microcontrollers/device-connect-strands/background.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,20 @@ Two packages make this work.
2626

2727
**`device-connect-agent-tools`** is the agent-side runtime. It exposes `discover_devices()` and `invoke_device()` as plain Python functions. The `robot_mesh` tool in Strands Robots wraps the same interface as a Strands tool, so an LLM can call it too. Both use the same underlying transport, so the same calls work whether the caller is a script or an agent.
2828

29-
```
30-
┌──────────────────────────────────────┐
31-
│ Agent layer │
32-
│ discover_devices · invoke_device │
33-
│ robot_mesh Strands tool │
34-
└──────────────┬───────────────────────┘
35-
│ Device Connect
36-
│ (device-to-device discovery & RPC)
37-
┌──────────────▼───────────────────────┐
38-
│ Device layer │
39-
│ Simulated SO-100 arm |
40-
| - so100-abc123 │
41-
│ heartbeat · execute · getStatus │
42-
└──────────────────────────────────────┘
43-
```
29+
![Architecture diagram showing two tiers: the agent layer containing discover_devices, invoke_device, and the robot_mesh Strands tool, connected via a Device Connect Zenoh D2D arrow to the device layer containing the SO-100 robot process with its peer ID and RPC functions#center](./images/visual1.png "Device Connect architecture: agent layer and device layer connected over Zenoh D2D")
4430

4531
## What a device exposes
4632

47-
This Learning Path uses the SO-100 arm, a simulated robot arm from Hugging Face. When `Robot('so100').run()` starts, it registers on the mesh and exposes three callable functions. These are what `invoke_device()` on the agent side targets — calling `invoke_device("so100-abc123", "execute", {...})` routes a request over Zenoh to the robot process and executes the function there, returning the result back to the caller:
33+
This Learning Path uses the SO-100 arm, an open-source robot arm. When `Robot('so100').run()` starts, it registers on the mesh and exposes three callable functions. These are what `invoke_device()` on the agent side targets — calling `invoke_device("so100-abc123", "execute", {...})` routes a request over Zenoh to the robot process and executes the function there, returning the result back to the caller:
4834

4935
- `execute` — send a natural language instruction and a policy provider to the robot
5036
- `getStatus` — query what the robot is currently doing
5137
- `stop` — halt the current task, or `emergency_stop` to halt every device on the mesh at once
5238

5339
A motion policy is the component that translates a high-level instruction like "pick up the cube" into a sequence of joint movements. Different policy providers connect to different backends — from local model inference to remote policy servers. For this Learning Path, `policy_provider='mock'` is used, so `execute` accepts the task and returns immediately without running real motion. Replacing `'mock'` with a real provider like `'lerobot_local'` or `'groot'` is a one-line change once you have the connectivity working.
5440

41+
Beyond discrete RPC calls, devices can also publish a continuous stream of sensor data over the same mesh. A camera publishes image frames, a depth sensor publishes point clouds, and an IMU reports pose updates — all as Device Connect events that any subscriber on the network receives in real time. The simulated robot in this Learning Path publishes joint state and observation updates at 10 Hz.
42+
5543
## What you'll learn in this Learning Path
5644

5745
By working through the remaining sections you'll:
41.4 KB
Loading
36.9 KB
Loading
63 KB
Loading

content/learning-paths/embedded-and-microcontrollers/device-connect-strands/run-example.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Two things happen when this script runs.
6262
4. Registers RPC handlers: `execute`, `getStatus`, `getFeatures`, `step`, `reset`, and `stop`.
6363
5. Starts a 10Hz background loop that emits `stateUpdate` and `observationUpdate` events to any listener on the mesh.
6464

65+
![Sequence diagram showing the call flow when r.run() executes: the script calls Robot() and DeviceRuntime, which announces presence to the Zenoh mesh, subscribes to the command topic, registers RPC handlers, and starts emitting stateUpdate events at 10 Hz#center](./images/visual2.png "Call flow inside r.run(): device registration and event publishing over Zenoh")
66+
6567
You should see INFO-level log output similar to:
6668

6769
```output

content/learning-paths/embedded-and-microcontrollers/device-connect-strands/run-infra-example.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ git clone --depth 1 https://github.com/arm/device-connect.git
3232

3333
This section involves two machines. Keep track of which commands run where:
3434

35+
![Network topology diagram showing the host machine running a Docker Compose stack with a Zenoh router on port 7447, etcd on port 2379, and a device registry on port 8080, alongside an agent process. The Raspberry Pi target runs a Robot process connected to the host Zenoh router over TCP. The agent process reaches the router over localhost and queries the device registry via discover_devices#center](./images/visual3.png "Two-machine topology: host running Device Connect infrastructure and Raspberry Pi robot process connected via Zenoh router")
36+
3537
| Machine | Terminal | Purpose |
3638
|---------|----------|---------|
3739
| Host | 1 | Docker Compose infrastructure |
@@ -80,7 +82,7 @@ Note the address returned - for the rest of this section it's referred to as `HO
8082

8183
## Step 3 - prepare the Raspberry Pi
8284

83-
On the Raspberry Pi, follow the same repository and environment setup from the setup section of this Learning Path: install Python 3.12, clone the `robots` repository, create the virtual environment, and install the packages with the same editable install commands.
85+
On the Raspberry Pi, follow the same repository and environment setup from the setup section: clone the `robots` repository and run `setup.sh` to install all dependencies.
8486

8587
Once the environment is ready, export the three variables that tell the SDK to route traffic through the Device Connect router on your host rather than using local network discovery:
8688

@@ -101,7 +103,7 @@ python <<'PY'
101103
import logging
102104
logging.basicConfig(level=logging.INFO)
103105
from strands_robots import Robot
104-
r = Robot('so100')
106+
r = Robot('so100', peer_id='so100-abc123')
105107
r.run()
106108
PY
107109
```
@@ -116,7 +118,7 @@ device_connect_sdk.device.so100-abc123 - INFO - Connected to ZENOH broker: ['tcp
116118
device_connect_sdk.device.so100-abc123 - INFO - Device registered: registration_id=ecfff6a7-...
117119
```
118120

119-
Note the peer ID (for example `so100-abc123`). You'll need it in the `tell` command below. Leave this process running on the Pi.
121+
Leave this process running on the Pi.
120122

121123
## Discover and invoke using the robot_mesh Strands tool
122124

@@ -137,7 +139,7 @@ Discovered 1 device(s):
137139
Functions: execute, getFeatures, getState, getStatus, stop
138140
```
139141

140-
Send an instruction to the robot. Replace `so100-abc123` with the peer ID shown in your output:
142+
Send an instruction to the robot using the peer ID set in Step 4:
141143

142144
```python
143145
python <<'PY'
@@ -194,4 +196,4 @@ In this section you've:
194196
- Connected a Raspberry Pi as a remote device by pointing its SDK at the router's TCP address.
195197
- Discovered the Pi's robot from your host by querying the persistent registry and sent commands to it across the network.
196198

197-
This is a deliberately simple two-device setup, but it demonstrates the foundation for something much larger. Once devices register through a shared infrastructure, agents can discover and command any of them without caring where they run - a fleet of robot arms, a network of sensors, or a mix of physical and simulated devices all become equally reachable. Adding more devices is just a matter of pointing them at the same router. That's the core of what Device Connect makes possible: a mesh of heterogeneous devices that agents can reason about and act on, at any scale.
199+
This two-device setup demonstrates the foundation for larger deployments. Once devices register through a shared infrastructure, adding more is a matter of pointing them at the same router — whether that's another Raspberry Pi in the same lab or a device on a different network.

content/learning-paths/embedded-and-microcontrollers/device-connect-strands/setup.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,32 @@ layout: learningpathall
88

99
## Verify the required tools
1010

11-
Before cloning any repositories, confirm that Python 3.12 and Git are available:
11+
Before cloning the repository, confirm that Git is available:
1212

1313
```bash
14-
python3.12 --version
1514
git --version
1615
```
1716

18-
These instructions are tested on Python 3.12. Earlier versions of Python 3 may work but are not validated against the `dev` branch used in this Learning Path.
19-
2017
## Clone the repository
2118

22-
The code run in this Learning Path sits in a branch of the `robots` repository. It contains the robot runtime and the `robot_mesh` Strands tool.
19+
Clone the `robots` repository, which contains the robot runtime and the `robot_mesh` Strands tool:
2320

2421
```bash
2522
mkdir ~/strands-device-connect
2623
cd strands-device-connect
27-
git clone https://github.com/strands-labs/robots.gits
24+
git clone https://github.com/strands-labs/robots
2825
```
2926

30-
## Check out the integration branch
27+
## Install dependencies
3128

32-
The Device Connect integration code for `robots` lives on the `dev` branch. This branch adds the `RobotDeviceDriver` adapter and the updated `robot_mesh` tool that routes calls through the Device Connect SDK rather than the raw Zenoh mesh.
29+
The repository includes a `setup.sh` script that installs `uv`, creates a Python 3.12 virtual environment, and installs all required packages:
3330

3431
```bash
3532
cd ~/strands-device-connect/robots
36-
git switch dev
37-
```
38-
39-
## Create a Python virtual environment
40-
41-
Create a single virtual environment at the workspace root, then activate it:
42-
43-
```bash
44-
python3.12 -m venv .venv
33+
./strands_robots/device_connect/setup.sh
4534
source .venv/bin/activate
4635
```
4736

48-
Now install the packages and make sure they are available on your `PYTHONPATH` environment variable:
49-
50-
```bash
51-
pip install -e ".[sim]"
52-
export PYTHONPATH="$PWD:$PYTHONPATH"
53-
```
54-
5537
## How discovery works - no configuration needed
5638

5739
The `strands-robots` SDK uses Device Connect's built-in device-to-device discovery: every `Robot()` instance announces itself on the local network at startup, and any process running `discover_devices()` or `robot_mesh(action='peers')` on the same network segment will find it automatically.
@@ -62,7 +44,7 @@ This means discovery works as long as the device process and the agent process a
6244

6345
At this point you've:
6446

65-
- Cloned `robots` with the `dev` branch checked out.
47+
- Cloned the `robots` repository.
6648
- Created a Python 3.12 virtual environment with the Device Connect SDK, agent tools, and robot simulation runtime all installed.
6749

6850
The next section walks you through starting a simulated robot and invoking it from both the agent tools and the `robot_mesh` Strands tool.

0 commit comments

Comments
 (0)