Agent ROS Bridge: Openclaw 技能的通用机器人集成

作者:互联网

2026-04-13

AI教程

什么是 Agent ROS Bridge?

Agent ROS Bridge 是一款强大的中间件,旨在促进 AI 智能体与物理机器人硬件之间的交互。它充当现代智能体框架与机器人操作系统 (ROS) 之间的通用翻译器,支持传统的 ROS1 Noetic 以及现代的 ROS2 Humble/Jazzy 环境。该技能秉承安全第一的理念,确保 Openclaw 技能在不损害安全性或数据完整性的情况下指挥具身智能系统。

通过 WebSockets、MQTT 和 gRPC 提供标准接口,该桥接器简化了机器人遥测和执行的复杂性。无论您是管理单个机械臂还是多样化的自动移动机器人车队,此工具都能提供必要的基础设施,将 Openclaw 技能带入物理领域。

下载入口:https://github.com/openclaw/skills/tree/main/skills/webthree549-bot/agent-ros-bridge

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install agent-ros-bridge

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 agent-ros-bridge。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Agent ROS Bridge 应用场景

  • 通过自然语言或代码智能体控制 UR、xArm 和 Franka 等机器人操作器。
  • 使用 Openclaw 技能协调多机器人车队以执行复杂的物流任务。
  • 通过 Prometheus 和 Grafana 仪表板监控实时传感器数据和遥测信息。
  • 在单一环境中桥接互不相干的 ROS1 和 ROS2 系统之间的通信。
  • 使用隔离的 Docker 模拟环境快速原型化具身 AI 应用。
Agent ROS Bridge 工作原理
  1. 用户通过设置强制性的 JWT_SECRET 来初始化桥接环境,以进行安全认证。
  2. 在桥接器中注册 WebSockets 或 gRPC 等传输方式,以处理传入的智能体请求。
  3. 桥接器连接到本地或网络化的 ROS 主节点/计算图,以发现可用的主题、服务和动作。
  4. AI 智能体使用 JWT 令牌进行身份验证,并向桥接器发送高级指令。
  5. 桥接器将这些指令转换为 ROS 原生消息,执行动作,并将传感器反馈返回给 Openclaw 技能界面。

Agent ROS Bridge 配置指南

要开始使用此技能,首先必须确保环境安全。使用以下命令安装并配置桥接器:

# 通过 pip 安装桥接器
pip install agent-ros-bridge

# 生成必需的安全密钥
export JWT_SECRET=$(openssl rand -base64 32)

# 使用特定配置启动桥接器
agent-ros-bridge --config config/bridge.yaml

对于更喜欢为 Openclaw 技能使用容器化环境的用户,推荐使用 Docker Compose:

cd examples/quickstart
docker-compose up

Agent ROS Bridge 数据架构与分类体系

该技能通过环境变量和结构化的 YAML 配置来管理数据,以确保 Openclaw 技能的无缝集成。

组件 来源 描述
JWT_SECRET 环境变量 所有身份验证循环所需的关键密钥。
BRIDGE_HOST 环境变量 桥接器绑定的网络地址(默认:127.0.0.1)。
bridge.yaml 配置文件 定义 AI 协议与 ROS 主题之间的映射。
遥测 指标流 用于机器人健康和状态的标准 Prometheus 指标。
name: agent-ros-bridge
version: 0.3.3
description: Universal ROS1/ROS2 bridge for AI agents to control robots and embodied intelligence systems.
author: Agent ROS Bridge Team
homepage: https://github.com/webthree549-bot/agent-ros-bridge
repository: https://github.com/webthree549-bot/agent-ros-bridge.git
license: MIT
metadata:
  {
    "openclaw":
      {
        "emoji": "??",
        "requires": { "bins": ["python3"], "env": ["JWT_SECRET"] },
        "suggests": { "bins": ["docker"] },
        "env":
          {
            "JWT_SECRET":
              {
                "description": "Required: Secret key for JWT authentication. Bridge will fail to start without this.",
                "sensitive": true,
                "required": true
              },
            "BRIDGE_HOST":
              {
                "description": "Optional: Bind address (default: 127.0.0.1 for security)",
                "sensitive": false,
                "required": false
              },
          },
        "security":
          {
            "notes": "SECURITY-FIRST DESIGN: JWT authentication is always required and cannot be disabled. All examples run in Docker containers for isolation. Never expose to public networks without TLS and firewall rules.",
          },
        "install":
          [
            {
              "id": "pip",
              "kind": "pip",
              "package": "agent-ros-bridge",
              "label": "Agent ROS Bridge from PyPI"
            },
            {
              "id": "docker",
              "kind": "manual",
              "label": "Docker Desktop (optional but recommended)",
              "instruction": "For running examples in isolated containers. Install from https://www.docker.com/products/docker-desktop"
            }
          ],
        "category": "robotics",
        "tags": ["ros", "ros2", "robotics", "iot", "automation", "bridge", "embodied-intelligence", "arm", "navigation"],
      },
  }

?? Agent ROS Bridge

Universal ROS1/ROS2 bridge for AI agents to control robots and embodied intelligence systems.

CI PyPI License


?? Security-First Design

JWT authentication is always required and cannot be disabled.

# Generate a secure secret (REQUIRED - no exceptions)
export JWT_SECRET=$(openssl rand -base64 32)

The bridge will fail to start without JWT_SECRET. This is by design — security is not optional.

See SECURITY.md for complete security guidelines.


Quick Start

All examples run in isolated Docker containers with simulated robots (no ROS installation needed).

# Clone repository
git clone https://github.com/webthree549-bot/agent-ros-bridge.git
cd agent-ros-bridge

# Generate JWT secret
export JWT_SECRET=$(openssl rand -base64 32)

# Run example in Docker
cd examples/quickstart
docker-compose up

# Test connection
curl http://localhost:8765/health

Available Examples

Example Description Run
examples/quickstart/ Basic bridge with simulated robot docker-compose up
examples/fleet/ Multi-robot fleet coordination docker-compose up
examples/arm/ Robot arm control simulation docker-compose up

All examples:

  • Run in isolated Docker containers
  • Use JWT authentication (enforced)
  • Include simulated robots (no hardware needed)
  • Bind to localhost (127.0.0.1) by default

Option 2: Native Installation (Production)

Requirements: Ubuntu 20.04/22.04 with ROS1 Noetic or ROS2 Humble/Jazzy

# Install from PyPI
pip install agent-ros-bridge

# Set required secret
export JWT_SECRET=$(openssl rand -base64 32)

# Start bridge
agent-ros-bridge --config config/bridge.yaml

See docs/NATIVE_ROS.md for detailed native installation.


Features

Feature Description
?? Security JWT auth always required, no bypass
?? Multi-Robot Fleet orchestration & coordination
?? Multi-Protocol WebSocket, MQTT, gRPC
?? Multi-ROS ROS1 + ROS2 simultaneously
?? Arm Control UR, xArm, Franka support
?? Monitoring Prometheus + Grafana

Documentation

Document Description
User Manual Complete guide (23,000+ words)
API Reference Full API documentation
Native ROS Ubuntu/ROS installation
Docker vs Native Deployment comparison
SECURITY.md Security policy

Usage

Python API

from agent_ros_bridge import Bridge
from agent_ros_bridge.gateway_v2.transports.websocket import WebSocketTransport

# Bridge requires JWT_SECRET env var
bridge = Bridge()
bridge.transport_manager.register(WebSocketTransport({"port": 8765}))
await bridge.start()

CLI

# Set required secret
export JWT_SECRET=$(openssl rand -base64 32)

# Start bridge
agent-ros-bridge --config config/bridge.yaml

# Generate token for client
python scripts/generate_token.py --secret $JWT_SECRET --role operator

  • Documentation: https://github.com/webthree549-bot/agent-ros-bridge/tree/main/docs
  • PyPI: https://pypi.org/project/agent-ros-bridge/
  • GitHub: https://github.com/webthree549-bot/agent-ros-bridge
  • Issues: https://github.com/webthree549-bot/agent-ros-bridge/issues

Security is not optional. JWT auth always required.

相关推荐