Skip to content
Merged
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
24 changes: 10 additions & 14 deletions strands_robots/device_connect/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,29 @@ No Docker needed. No env vars. Devices discover each other directly on the LAN v

#### Setup

Clone the repo and create a virtual environment:
##### 1. Install

> `setup.sh` installs `uv`, Python 3.12, creates a venv, and installs all dependencies.

```bash
git clone --branch feat/device-connect-integration-draft https://github.com/atsyplikhin/robots.git
cd robots

python3.12 --version # verify Python 3.12 is installed
# If not installed, see https://www.python.org/downloads/ or use your package manager:
# macOS: brew install python@3.12
# Ubuntu: sudo apt install python3.12 python3.12-venv

python3.12 -m venv .venv # Python 3.12 recommended (MuJoCo has no 3.14 wheels)
./strands_robots/device_connect/setup.sh
source .venv/bin/activate

pip install -e ".[sim]" # install from source; sim = MuJoCo, Device Connect SDK is a core dep

export PYTHONPATH="$PWD:$PYTHONPATH" # only needed when running from source checkout
```

**Start a robot (keep running in a separate terminal):**
##### 2. Start a robot

```python
```bash
screen -S robot # start a persistent session
python -c "
from strands_robots import Robot
r = Robot('so100')
r.run()
"
# once online, Ctrl+a then d to detach
# screen -ls to list sessions
# screen -r robot to reattach
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

```

Expected output:
Expand Down
53 changes: 53 additions & 0 deletions strands_robots/device_connect/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# setup.sh — one-command environment setup for Strands Robots + Device Connect
#
# Usage:
# ./strands_robots/device_connect/setup.sh
#
set -euo pipefail

PYTHON_VERSION="3.12"
VENV_DIR=".venv"
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"

echo "============================================================"
echo " Strands Robots — Environment Setup"
echo "============================================================"
echo ""

# ── 0. Install uv (if needed) ────────────────────────────────────────────────
if ! command -v uv &>/dev/null; then
echo "[0/2] uv not found — installing..."
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
else
echo "[0/2] uv $(uv --version) ✓"
fi

# ── 1. Install Python (if needed) ────────────────────────────────────────────
if ! uv python find "$PYTHON_VERSION" &>/dev/null; then
echo "[1/2] Python $PYTHON_VERSION not found — installing via uv..."
uv python install "$PYTHON_VERSION"
else
echo "[1/2] Python $PYTHON_VERSION ✓"
fi

# ── 2. Create virtual environment and install ────────────────────────────────
if [ ! -d "$REPO_ROOT/$VENV_DIR" ]; then
echo "[2/2] Creating virtual environment and installing packages..."
uv venv --python "$PYTHON_VERSION" "$REPO_ROOT/$VENV_DIR"
else
echo "[2/2] Virtual environment exists, installing packages..."
fi

# shellcheck disable=SC1091
source "$REPO_ROOT/$VENV_DIR/bin/activate"
uv pip install -e "$REPO_ROOT[sim]"

echo ""
echo "============================================================"
echo " Setup complete"
echo "============================================================"
echo ""
echo "Activate the environment:"
echo " source $REPO_ROOT/$VENV_DIR/bin/activate"