Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
---
title: Prepare the Device Connect dashboard
description: Install the dashboard dependencies and verify that the exported MAPPO actor matches the deployment interface.
weight: 2

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Understand the deployment workflow

The training Learning Path produces an actor-only `.npz` file. The dashboard treats that file as a model that can move through a Device Connect deployment:

```text
Exported MAPPO actor
Local model server
Device Connect model download
Simulated device policy package
```

You will run every service on the Arm cloud instance. The dashboard uses a simulated device, so this workflow doesn't connect to or move a physical robot.

## Locate the exported actor

Set `ACTOR_OUTPUT` to the artifact printed by `export_mappo_actor.py` in the training Learning Path. Replace the example filename with the frame count and source-checksum suffix from your export:

```bash
export ACTOR_OUTPUT="$HOME/mappo_actor_exports/mappo_actor_3agent_1910000_a1b2c3d4e5f6.npz"
test -f "$ACTOR_OUTPUT" && echo "Actor found: $ACTOR_OUTPUT"
```

The command prints the complete actor path. If it prints nothing, correct `ACTOR_OUTPUT` before continuing.

## Clone the MAPPO demo

Clone the repository that contains the Device Connect dashboard:

```bash
export MAPPO_DEMO="$HOME/mappo-arm-cloud-physical-ai"
git clone --filter=blob:none --no-checkout --depth 1 \
https://github.com/armwaheed/mappo-arm-cloud-physical-ai.git \
"$MAPPO_DEMO"
git -C "$MAPPO_DEMO" fetch --depth 1 origin \
40d9be795da4e06725a1fc515ed5d3a6a9e7e5c1
git -C "$MAPPO_DEMO" checkout --detach \
40d9be795da4e06725a1fc515ed5d3a6a9e7e5c1
```

The commit is pinned so that the commands and dashboard interface remain consistent with this Learning Path.

## Install the dashboard dependencies

Create a separate Python environment for the dashboard. Device Connect needs Python 3.11 or later; the Arm cloud environment from the training Learning Path provides Python 3.12:

```bash
python3.12 -m venv "$HOME/venvs/mappo-dashboard"
source "$HOME/venvs/mappo-dashboard/bin/activate"
python -m pip install --upgrade pip
python -m pip install \
"device-connect-edge==0.2.5" \
"device-connect-agent-tools==0.2.5" \
"aiohttp==3.14.3" \
"numpy==2.4.6" \
"Pillow==12.3.0"
```

Verify the architecture, Python version, and Device Connect package versions:

```bash
python - <<'PY'
import platform
import sys
from importlib.metadata import version

print("Architecture:", platform.machine())
print("Python:", sys.version.split()[0])
print("Device Connect edge:", version("device-connect-edge"))
print("Device Connect agent tools:", version("device-connect-agent-tools"))
PY
```

The output is similar to:

```output
Architecture: aarch64
Python: 3.12.x
Device Connect edge: 0.2.5
Device Connect agent tools: 0.2.5
```

## Check the actor interface

The dashboard accepts the actor only if it contains the expected arrays and metadata. Run the same inspection that the dashboard applies after a model download:

```bash
cd "$MAPPO_DEMO/dashboard"
python - <<'PY'
import json
import os

from model_store import inspect_model

report = inspect_model(os.environ["ACTOR_OUTPUT"])
print(json.dumps(report.as_dict(), indent=2))
raise SystemExit(0 if report.loadable else 1)
PY
```

A compatible actor reports values similar to:

```output
{
"name": "mappo_actor_3agent_1910000_a1b2c3d4e5f6.npz",
"loadable": true,
"problems": [],
"trained_lidar_range_vmas": 0.35,
"rays": 12,
"training_frames": 1910000,
"training_n_agents": 3
}
```

The command exits with a nonzero status if the actor can't be loaded. Don't continue if `problems` contains an unexpected array shape or LiDAR feature count.

## Create a disposable policy package

Arming a model changes `config.json` in the policy package. Copy the package to a temporary directory so the repository remains unchanged:

```bash
DASHBOARD_PACKAGE="$(mktemp -d -t mappo-dashboard-policy.XXXXXX)"
export DASHBOARD_PACKAGE
cp -a "$MAPPO_DEMO/policy/." "$DASHBOARD_PACKAGE/"
echo "Dashboard package: $DASHBOARD_PACKAGE"
```

## What you've accomplished

You have installed the dashboard dependencies, verified the exported actor contract, and created a disposable policy package. Next, you will start the Device Connect services and open the dashboard.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Launch the Device Connect dashboard
description: Start the MAPPO model server, simulated device driver, and browser dashboard on the Arm cloud instance.
weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Forward the dashboard port

The dashboard has no login. Keep it bound to the cloud instance's loopback interface and use SSH port forwarding instead of exposing it to the internet.

Open another terminal on your local computer and connect to the cloud instance. Replace the username and address with your SSH details:

```bash
ssh -N -o ExitOnForwardFailure=yes \
-L 8080:127.0.0.1:8080 \
ubuntu@<cloud-instance-address>
```

Keep this SSH connection open while you use the dashboard.

## Start the dashboard services

Return to the SSH terminal where you set `ACTOR_OUTPUT`, `MAPPO_DEMO`, and `DASHBOARD_PACKAGE`. Start the dashboard without `--allow-motion`:

```bash
cd "$MAPPO_DEMO"
./dashboard/start-dashboard.sh \
--python "$HOME/venvs/mappo-dashboard/bin/python" \
--package "$DASHBOARD_PACKAGE" \
--models-dir "$(dirname "$ACTOR_OUTPUT")"
```

The launcher starts three processes:

- The model server publishes the `.npz` files in the actor export directory
- The simulated driver exposes model-management functions through Device Connect
- The web server presents the fleet and checkpoint controls in your browser

The output ends with lines similar to:

```output
http://127.0.0.1:8080
fleet sim
motion DISABLED (status and checkpoints only).
Ctrl-C stops all three.
```

{{% notice Note %}}
The launcher deliberately leaves motion disabled. The simulated device is sufficient to validate the model distribution and selection workflow.
{{% /notice %}}

## Open the dashboard

On your local computer, open [the forwarded Device Connect dashboard](http://127.0.0.1:8080/) in a browser.

The following screenshot shows the dashboard's complete multi-robot layout. Use it to locate the **Fleet**, **Checkpoints on the robot**, and **Load from Cloud AI** panels. It was captured from a different, motion-enabled demonstration, so its header states **MOTION ENABLED** and **MESH DOWN**.

![Arm Device Connect dashboard showing the robot fleet, motion controls, camera feed, installed MAPPO checkpoints, and Cloud AI model source. Use the Fleet and checkpoint panels as interface landmarks; this screenshot comes from a different demonstration with motion enabled and the mesh disconnected.#center](images/device-connect-dashboard.webp "Arm Device Connect dashboard interface reference")

{{% notice Warning %}}
Don't reproduce the motion state shown in the screenshot. Your simulation-only session must show **MESH UP** and **MOTION DISABLED** before you continue.
{{% /notice %}}

Confirm that the interface shows:

- **MESH UP** in the header
- `mappo-sim` with a **LIVE** state in the **Fleet** table
- **MOTION DISABLED** in the header
- `mappo-sim` selected under **Focus**

The fleet row proves that the browser server discovered the simulated driver through the Device Connect mesh. The header also confirms that this run cannot issue motion commands.

## What you've accomplished

You have started the model server, Device Connect driver, and dashboard without exposing an unauthenticated port or enabling motion. Next, you will load and arm your exported actor through the dashboard.
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: Load and validate the MAPPO actor
description: Use the dashboard to download the exported actor, arm it for the simulated device, and run an inference smoke test.
weight: 4

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Browse the model source

The launcher advertises the local model server to the simulated device. The browser asks the device to browse that source, so the request follows the same Device Connect path used by a remote deployment.

In the **Load from Cloud AI** panel, confirm that **Source** shows **local checkpoint server — local model server**. Select **Browse** if the actor list hasn't appeared automatically.

The actor list shows your `.npz` filename and the message **served by mappo-model-server**. This response confirms that the simulated device can reach the model source.

## Load the actor onto the simulated device

Select **Use** beside your exported actor. Its address appears in the first **Source** field.

Enter `trained_mappo_actor_part2.npz` in **Install as**. The new name prevents a collision if the disposable package already contains a checkpoint with the exporter's default filename.

Select **Load onto robot**. In this simulation-only workflow, the destination is the disposable policy package rather than physical hardware.

The result reports these checks:

```output
loaded trained_mappo_actor_part2.npz
sha256 <actor checksum>
rays 12
trained range 0.35
runnable now yes

Not armed. Arm it in the table above when you want the next run to use it.
```

The filename and checksum depend on your actor. Don't continue unless the result says `runnable now yes`.

## Arm the actor

Find the downloaded actor in **Checkpoints on the robot**. It should have the **ready** state.

Select **Arm** beside the actor. The state changes to **armed**, and the **Armed checkpoint** column in the fleet row shows the same filename.

Loading and arming are separate operations. The dashboard inspects a downloaded file before it changes `model_path`, and an armed model takes effect only when the next policy process starts.

Press the **E** key to open the event drawer. Look for the `model downloaded` and `checkpoint armed` events. These events record both changes made through Device Connect.

## Stop the dashboard

Return to the cloud SSH terminal running `start-dashboard.sh` and press **Ctrl+C**. The launcher stops the model server, simulated driver, and web server together.

The output names each process as it stops:

```output
stopping checkpoint server
stopping driver
stopping dashboard
```

## Run an inference smoke test

The disposable policy package now points to the actor you armed. Run its installation check:

```bash
source "$HOME/venvs/mappo-dashboard/bin/activate"
python "$DASHBOARD_PACKAGE/basic_test.py"
```

The output identifies your checkpoint and ends with:

```output
checkpoint trained_mappo_actor_part2.npz
trained on 1910000 frames, 3 agents
ActionOutput(...)
PASS
```

The action values depend on your actor. `PASS` confirms that the policy package loaded the armed arrays, constructed an 18-value observation, and completed one inference step.

## What you've accomplished

You have served an exported MAPPO actor, transferred it through Device Connect, armed it in a disposable policy package, and validated inference. The complete workflow used a simulated device and did not connect to or move physical hardware.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Load a MAPPO policy with the Arm Device Connect dashboard
description: Use the Arm Device Connect dashboard to distribute, select, and validate an exported MAPPO policy on an Arm cloud instance.
minutes_to_complete: 45

who_is_this_for: This Learning Path is for machine learning developers who have exported a MAPPO actor and want to validate its deployment workflow through a browser-based Device Connect dashboard.

draft: true
cascade:
draft: true

learning_objectives:
- Set up the MAPPO Device Connect dashboard on an Arm cloud instance.
- Serve an exported MAPPO actor to a simulated device through Device Connect.
- Load, arm, and validate the selected actor without connecting physical hardware.

prerequisites:
- An Arm-based Ubuntu 24.04 cloud instance with SSH access, `sudo` privileges, and internet access.
- The actor-only `.npz` artifact created in the [MAPPO training Learning Path](/learning-paths/servers-and-cloud-computing/train-mappo-navigation-arm-cloud/).
- A local browser and permission to forward port 8080 through SSH.

author: Waheed Brown

generate_summary_faq: true
rerun_summary: false
rerun_faqs: false

### Tags
skilllevels: Advanced
subjects: ML
armips:
- Neoverse
tools_software_languages:
- Arm Device Connect
- MAPPO
- Python
- NumPy
operatingsystems:
- Linux

further_reading:
- resource:
title: Train a MAPPO navigation policy on Arm cloud
link: /learning-paths/servers-and-cloud-computing/train-mappo-navigation-arm-cloud/
type: website
- resource:
title: MAPPO Arm cloud Physical AI demo
link: https://github.com/armwaheed/mappo-arm-cloud-physical-ai
type: website
- resource:
title: Arm Device Connect repository
link: https://github.com/arm/device-connect
type: website
- resource:
title: BenchMARL repository
link: https://github.com/facebookresearch/BenchMARL
type: website

### FIXED, DO NOT MODIFY
# ================================================================================
weight: 1
layout: "learningpathall"
learning_path_main_page: "yes"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading