Agent ROS Bridge - Universal ROS1/ROS2 bridge for AI agents to control robots and embodied intelligence systems
Project description
Agent ROS Bridge
Universal ROS1/ROS2 bridge for AI agents to control robots and embodied intelligence systems.
๐ Security First
Required before running: Set a JWT secret for authentication.
# Generate a secure secret
export JWT_SECRET=$(openssl rand -base64 32)
See SECURITY.md for complete security guidelines.
Quick Start
Production (requires ROS1 or ROS2)
pip install agent-ros-bridge
python run_bridge.py # Auto-detects ROS1 Noetic or ROS2 Humble/Jazzy
Demo/Testing (no ROS required)
pip install agent-ros-bridge
python examples/quickstart/mock_bridge.py # Simulated robot
Native ROS (Recommended for Development)
Single ROS Version (auto-detect):
# One-line installer
curl -sSL https://raw.githubusercontent.com/webthree549-bot/agent-ros-bridge/main/scripts/install-native.sh | bash
# Run with native ROS
source /opt/ros/humble/setup.bash # or noetic, jazzy
python run_bridge.py
Dual ROS1 + ROS2 (simultaneous):
# Source both ROS environments
source /opt/ros/noetic/setup.bash
source /opt/ros/humble/setup.bash
# Run dual bridge
python run_bridge_dual_ros.py
See docs/NATIVE_ROS.md for detailed native installation.
Web Dashboard
# Start bridge (in another terminal)
cd examples/quickstart && ./run.sh
# Start dashboard
python dashboard/server.py
# Open http://localhost:8080 in browser
Fleet Orchestration (Multi-Robot)
# Start fleet orchestrator with 4 simulated robots
cd examples/fleet && ./run.sh
# Query fleet status
wscat -c ws://localhost:8771
> {"command": {"action": "fleet.status"}}
> {"command": {"action": "fleet.metrics"}}
> {"command": {"action": "fleet.submit_task", "parameters": {"type": "navigate", "target": "zone_a"}}}
Arm Robot Control (Manipulation)
# Control UR5 arm
cd examples/arm && ./run.sh --arm-type ur --demo pick_place
# Control xArm
cd examples/arm && ./run.sh --arm-type xarm
# Interactive control
cd examples/arm && ./run.sh --arm-type ur --demo interactive
# Then: wscat -c ws://localhost:8772
ROS Actions (Navigation, Planning)
# Navigation action demo
cd examples/actions && ./run.sh --action navigate
# Manipulation trajectory demo
cd examples/actions && ./run.sh --action manipulate
# Interactive action control
cd examples/actions && ./run.sh --action interactive
# Then: wscat -c ws://localhost:8773
# Send: {"command": {"action": "actions.navigate", "parameters": {"x": 5.0, "y": 3.0}}}
Prometheus Metrics (Monitoring)
# Start metrics server
cd examples/metrics && ./run.sh
# View metrics
curl http://localhost:9090/metrics
# For Grafana:
# 1. Import dashboards/grafana-dashboard.json
# 2. Add Prometheus data source: http://localhost:9090
Project Structure
agent-ros-bridge/ # Repository root
โโโ agent_ros_bridge/ # โญ Core source package
โ โโโ gateway_v2/ # Main gateway implementation
โ โ โโโ core.py # Bridge class
โ โ โโโ auth.py # Authentication
โ โ โโโ transports/ # Communication protocols
โ โ โโโ connectors/ # ROS connectors
โ โโโ fleet/ # Fleet orchestration
โ โโโ plugins/ # Robot plugins (arm, etc.)
โ โโโ actions/ # ROS actions support
โ โโโ metrics/ # Prometheus metrics
โโโ tests/ # Test suite
โโโ examples/ # โญ Runnable examples (7 demos)
โ โโโ quickstart/ # Basic bridge usage
โ โโโ fleet/ # Multi-robot coordination
โ โโโ auth/ # JWT authentication
โ โโโ mqtt_iot/ # IoT sensor integration
โ โโโ actions/ # ROS navigation/actions
โ โโโ arm/ # Robotic arm control
โ โโโ metrics/ # Prometheus monitoring
โโโ docs/ # Documentation (40,000+ words)
โโโ scripts/ # Utility scripts
โโโ config/ # Configuration templates
โโโ docker/ # Docker containers
โโโ dashboard/ # Web dashboard
โโโ Makefile # Build automation
โโโ pyproject.toml # Package configuration
See Repository Structure for complete details.
Features
- Multi-Protocol: WebSocket, gRPC, MQTT, TCP
- Multi-Robot: Manage fleets of robots
- Fleet Orchestration: Task allocation, load balancing, coordination
- Arm Robot Control: UR, xArm, Franka manipulation support
- ROS Actions: Navigation, motion planning, long-running tasks
- Prometheus Metrics: Production monitoring with Grafana dashboards
- Multi-ROS: Connect to multiple ROS1/ROS2 endpoints simultaneously
- Dual ROS: Run ROS1 + ROS2 in the same bridge instance
- Remote ROS: Connect to robots over the network
- Plugin System: Build custom applications
- ROS Support: ROS1 Noetic, ROS2 Humble/Jazzy/Iron
- Cloud-Native: Docker, Kubernetes ready
Development
The repository maintains strict separation between source code and build artifacts:
# Clone and setup
git clone https://github.com/webthree549-bot/agent-ros-bridge.git
cd agent-ros-bridge
# Install in development mode
make install-dev
# Development workflow
make format # Format code
make test # Run tests
make check # Lint + test
# Clean build artifacts
make clean # Remove all generated files
make build # Create wheel and sdist
See CONTRIBUTING.md and Repository Structure for details.
Documentation
| Document | Description |
|---|---|
| User Manual | Complete guide (23,000+ words) - Installation, tutorials, troubleshooting |
| API Reference | Full API docs - Classes, methods, examples |
| Native ROS | Ubuntu/ROS installation and setup |
| Multi-ROS | Fleet management and coordination |
| Docker vs Native | Deployment strategy comparison |
| DDS Architecture | ROS2/DDS relationship explained |
| Repository Structure | Clean source/build separation |
Quick Links:
- Installation Guide
- Docker vs Native Decision Matrix
- Repository Structure
- WebSocket Protocol
- Fleet Management
- Troubleshooting
Installation
Via PyPI
pip install agent-ros-bridge
Via ClawHub
openclaw skills add agent-ros-bridge
From Source
git clone https://github.com/webthree549-bot/agent-ros-bridge.git
cd agent-ros-bridge
pip install -e ".[dev]"
Usage
Python API
from agent_ros_bridge import Bridge
from agent_ros_bridge.transports.websocket import WebSocketTransport
bridge = Bridge()
bridge.transport_manager.register(WebSocketTransport({"port": 8765}))
await bridge.start()
CLI
agent-ros-bridge --demo
agent-ros-bridge --config ./config.yaml
License
Made with โค๏ธ by the Agent ROS Bridge Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_ros_bridge-0.2.1.tar.gz.
File metadata
- Download URL: agent_ros_bridge-0.2.1.tar.gz
- Upload date:
- Size: 106.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbbbbb8b7d2a312ca73d6b7beea387d6f63c2b6486dcc8b0435cf96d08417a28
|
|
| MD5 |
8c3e2cf88f1efcf784e4e2d111f5c817
|
|
| BLAKE2b-256 |
6586d18f3d6f442b607bceb947244bd521f85af385df99d9857976d8b77683c2
|
File details
Details for the file agent_ros_bridge-0.2.1-py3-none-any.whl.
File metadata
- Download URL: agent_ros_bridge-0.2.1-py3-none-any.whl
- Upload date:
- Size: 55.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ddb94688b4fd04fb7e7f09967fa5da697910c8a8cbe3d95c6636d56567e1d5
|
|
| MD5 |
c34ebbc3c3b53d9552a2bbf972b69689
|
|
| BLAKE2b-256 |
7c70fe729e371c8eaf7510524c97fde6f859ee79415409fe4ca358f3d4abc387
|