Skip to main content

Robot Control with LeRobot Integration for Strands Agents

Project description

strands-robots

Robot control for Strands Agents.

Install

pip install strands-robots

Quick Start

from strands import Agent
from strands_robots import Robot, gr00t_inference

# Create robot with cameras
robot = Robot(
    tool_name="my_arm",
    robot="so101_follower",
    cameras={
        "front": {"type": "opencv", "index_or_path": "/dev/video0", "fps": 30},
        "wrist": {"type": "opencv", "index_or_path": "/dev/video2", "fps": 30}
    },
    port="/dev/ttyACM0",
    data_config="so100_dualcam"
)

# Create agent with robot tool
agent = Agent(tools=[robot, gr00t_inference])

# Start GR00T inference service
agent.tool.gr00t_inference(
    action="start",
    checkpoint_path="/path/to/checkpoint",
    port=8000,
    data_config="so100_dualcam"
)

# Control robot with natural language
agent("Use my_arm to pick up the red block using GR00T policy on port 8000")

# Cleanup
agent.tool.gr00t_inference(action="stop", port=8000)

Features

  • Robot Support - LeRobot integration (SO-100/101, Fourier GR-1, Unitree G1, Panda)
  • Policy Abstraction - Clean interface for any VLA provider (GR00T, ACT, etc.)
  • Multi-Camera - OpenCV and RealSense support with batch capture
  • Serial Communication - Feetech servo control and monitoring
  • Strands Tools - Camera, inference service, and serial tools included

Architecture

strands-robots/
├── robot.py              # Universal Robot class
├── policies/             # Policy abstraction
│   ├── __init__.py       # Policy base + factory
│   └── groot/            # GR00T implementation
│       ├── client.py     # ZMQ client
│       └── data_config.py # 6 embodiment configs
└── tools/                # Strands tools
    ├── gr00t_inference.py  # Docker service manager
    ├── lerobot_camera.py   # Camera operations
    └── serial_tool.py      # Serial communication

Supported Robots

  • SO-100/SO-101 - Single camera or dual camera modes
  • Fourier GR-1 - Bimanual humanoid arms
  • Unitree G1 - Humanoid robot platform
  • Bimanual Panda - Dual Franka Emika arms
  • Any LeRobot-compatible robot

Policy Providers

from strands_robots import create_policy

# GR00T policy
policy = create_policy(
    provider="groot",
    data_config="so100_dualcam",
    host="localhost",
    port=8000
)

# Mock policy (testing)
policy = create_policy(provider="mock")

Camera Tool

# Discover cameras
agent.tool.lerobot_camera(action="discover")

# Capture single image
agent.tool.lerobot_camera(
    action="capture",
    camera_id="/dev/video0",
    save_path="./captures"
)

# Batch capture from multiple cameras
agent.tool.lerobot_camera(
    action="capture_batch",
    camera_ids=["/dev/video0", "/dev/video2"],
    async_mode=True
)

# Record video
agent.tool.lerobot_camera(
    action="record",
    camera_id="/dev/video0",
    capture_duration=10.0
)

GR00T Inference Service

# Start service
agent.tool.gr00t_inference(
    action="start",
    checkpoint_path="/data/checkpoints/model",
    port=8000,
    data_config="so100_dualcam",
    denoising_steps=4
)

# Check status
agent.tool.gr00t_inference(action="status", port=8000)

# List all services
agent.tool.gr00t_inference(action="list")

# Stop service
agent.tool.gr00t_inference(action="stop", port=8000)

Serial Communication

# List available ports
agent.tool.serial_tool(action="list_ports")

# Control Feetech servo position
agent.tool.serial_tool(
    action="feetech_position",
    port="/dev/ttyACM0",
    motor_id=1,
    position=2048  # Center position
)

# Monitor serial data
agent.tool.serial_tool(
    action="monitor",
    port="/dev/ttyACM0",
    baudrate=1000000
)

Custom Robot Configuration

from lerobot.robots.config import RobotConfig

# Use LeRobot config directly
config = RobotConfig(...)
robot = Robot(tool_name="custom", robot=config)

# Or pass LeRobot Robot instance
from lerobot.robots.robot import Robot as LeRobotRobot
lerobot_instance = LeRobotRobot(...)
robot = Robot(tool_name="custom", robot=lerobot_instance)

Data Configs

Available GR00T data configurations:

  • so100 - Single camera SO-100
  • so100_dualcam - Dual camera SO-100 (front + wrist)
  • so100_4cam - Quad camera SO-100
  • fourier_gr1_arms_only - Fourier GR-1 arms
  • bimanual_panda_gripper - Bimanual Panda
  • unitree_g1 - Unitree G1 humanoid

License

Apache-2.0

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_robots-0.2.0.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_robots-0.2.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file strands_robots-0.2.0.tar.gz.

File metadata

  • Download URL: strands_robots-0.2.0.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for strands_robots-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff5f1bcdf766c0d3a9c9e2318cfe231e5ebc03f9b09d7c1a392c19ad5b0a7e93
MD5 f7f1f31249e9813d0ea0f64ad4b9bf3d
BLAKE2b-256 75606e30f04d7781a991fbbfa8ff8f1ef502421c72e48ade95d37140db381115

See more details on using hashes here.

File details

Details for the file strands_robots-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: strands_robots-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for strands_robots-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88bca44ee4f5fb91bf0a8be83c446e678f4fa119d6983b67f57f65341f8e78bd
MD5 d79491b4d782d1e656deddcd97fc5ed8
BLAKE2b-256 1b9e7dc52c962dade65f73f9f64afe74aa04bcdb4e59cfc83e80fb161bd0c4ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page