Skip to content

AI-NAtive-I/agent-ros-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

619 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Agent ROS Bridge ๐Ÿ”’

Version Python Tests Coverage Safety Gate 2 License

The Safety-First Production Gateway for AI-to-Robot Integration
When robots matter, safety comes first.

Why Us? โ€ข Quick Start โ€ข Safety First โ€ข Comparison โ€ข Docs


Why Agent ROS Bridge?

Unlike diagnostic tools (NASA ROSA) or research platforms (ROS-LLM), Agent ROS Bridge is the only production-ready gateway with built-in safety validation.

The Safety Problem

Deploying LLM-controlled robots in production is dangerous:

  • AI hallucinations can damage equipment
  • Wrong commands can injure humans
  • No validation of AI decisions
  • No learning from operator corrections

Our Solution

๐Ÿ›ก๏ธ Safety-First Architecture:
โ”œโ”€โ”€ Human-in-the-Loop (enforced by default)
โ”œโ”€โ”€ Shadow Mode Validation (200+ hours required)
โ”œโ”€โ”€ Simulation Testing (10K scenarios, 95.93% success)
โ”œโ”€โ”€ Gradual Rollout (0% โ†’ 100% autonomy)
โ””โ”€โ”€ Emergency Stop (always available)

Comparison

Feature Agent ROS Bridge NASA ROSA ROS-LLM
Safety Validation โœ… Shadow mode โŒ None โŒ None
Human-in-the-Loop โœ… Enforced โš ๏ธ Optional โŒ No
Production Tests โœ… 2,021 tests โ“ Unknown โ“ Unknown
Simulation โœ… 10K scenarios โš ๏ธ Basic โŒ No
Multi-Protocol โœ… 4 protocols โŒ CLI only โŒ ROS2 only
Fleet Support โœ… Multi-robot โŒ Single โŒ Single
Published Research ๐Ÿ“ Whitepaper in progress โœ… arXiv โœ… Nature

Full Comparison โ†’


Quick Start

Installation

pip install agent-ros-bridge

Basic Usage

from agent_ros_bridge import RobotAgent

# Create agent with SAFETY enforced
agent = RobotAgent(
    device_id='bot1',
    llm_provider='moonshot',
    require_confirmation=True,  # Human approval required
)

# AI proposes, human approves, robot executes
result = agent.execute("Go to the kitchen")

print(f"Success: {result.success}")
print(f"AI confidence: {result.ai_confidence:.2f}")
print(f"Human approvals: {result.human_approvals}")

Output:

============================================================
๐Ÿ›ก๏ธ  SAFETY STATUS
============================================================
Device: bot1 (mobile_robot)
Autonomous Mode: False โœ…
Human-in-the-Loop: True โœ…
Shadow Mode: True โœ…
Validation Status: simulation_only
============================================================

๐Ÿค– AI Proposal: navigate_to(kitchen)
๐Ÿ‘ค Human: Approve? (y/n): y
โœ… Executed successfully

Safety First

Safe-by-Default Configuration

# config/global_config.yaml
safety:
  autonomous_mode: false              # Human approval required
  human_in_the_loop: true             # All AI proposals need approval
  shadow_mode_enabled: true           # Collect validation data
  min_confidence_for_auto: 0.95       # High confidence threshold
  gradual_rollout_stage: 0            # Start at 0% autonomy
  safety_validation_status: "simulation_only"
  required_shadow_hours: 200.0        # Target for validation
  min_agreement_rate: 0.95            # Required agreement %

Deployment Stages

Stage 0: Simulation-Only (Current)
โ”œโ”€โ”€ โœ… 10K scenarios tested
โ”œโ”€โ”€ โœ… 95.93% success rate
โ””โ”€โ”€ โš ๏ธ No real-world validation yet

Stage 1: Supervised Operation
โ”œโ”€โ”€ Human approves all actions
โ”œโ”€โ”€ Shadow mode collects data
โ””โ”€โ”€ Target: 200+ hours, >95% agreement

Stage 2: Gradual Rollout
โ”œโ”€โ”€ 10% โ†’ 25% โ†’ 50% โ†’ 75% โ†’ 100%
โ”œโ”€โ”€ High confidence only
โ””โ”€โ”€ Monitor at each stage

Stage 3: Full Autonomy
โ”œโ”€โ”€ After validation complete
โ”œโ”€โ”€ Emergency stop always available
โ””โ”€โ”€ Continuous monitoring

Safety Documentation โ†’


Architecture

AI Agents โ”€โ”ฌโ”€ WebSocket โ”€โ”
           โ”œโ”€ gRPC โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ–บ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ”œโ”€ MQTT โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”‚   Gateway   โ”‚
           โ””โ”€ TCP โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ–ผ                โ–ผ                โ–ผ
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚Safety Layer  โ”‚  โ”‚ Shadow Mode  โ”‚  โ”‚  ROS1/   โ”‚
            โ”‚(Validation)  โ”‚  โ”‚ (Data Coll.) โ”‚  โ”‚  ROS2    โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Components

Component Purpose Status
Gateway Multi-protocol support โœ… Stable
Safety Layer Validation & enforcement โœ… Implemented
Shadow Mode AI-human decision logging โœ… Active
Simulation 10K scenario testing โœ… Complete
Fleet Multi-robot orchestration โœ… Beta

Features

๐Ÿ›ก๏ธ Safety & Validation

  • Shadow Mode - Log AI proposals vs human decisions
  • Human-in-the-Loop - Enforced by default
  • Simulation Testing - 10K scenarios before deployment
  • Gradual Rollout - Increase autonomy slowly
  • Emergency Stop - Always available

๐ŸŒ Multi-Protocol

  • WebSocket - Real-time bidirectional
  • gRPC - High-performance RPC
  • MQTT - IoT messaging
  • TCP - Raw socket support

๐Ÿค– Universal Support

  • Mobile Robots - Navigation, mapping
  • Drones - Flight control, aerial missions
  • Robot Arms - Manipulation, grasping
  • Humanoids - Walking, balancing
  • Sensors - Data collection, monitoring

๐Ÿง  AI Integration

  • Multi-LLM - OpenAI, Moonshot, Anthropic
  • Intent Parsing - Natural language understanding
  • Context Awareness - Scene understanding
  • Multi-Language - English, Chinese, +4 more

Documentation


Web Dashboard

Agent ROS Bridge includes a modern web dashboard for robot control and monitoring.

Features

  • ๐ŸŽฎ Robot Control - D-pad interface, natural language commands
  • ๐Ÿ“Š Real-time Telemetry - Position, velocity, battery, sensors
  • ๐Ÿง  Shadow Mode Metrics - AI-human agreement tracking
  • ๐Ÿ›ก๏ธ Safety Status - Validation gates, deployment readiness
  • ๐Ÿš Fleet Management - Multi-robot coordination

Quick Start

Option 1: Docker (Recommended)

# Start bridge + web dashboard
docker-compose --profile web up -d

# Access dashboard
open http://localhost:8081

Option 2: Host (Development)

# Start bridge
agent-ros-bridge --websocket-port 8765

# In another terminal, serve dashboard
cd agent_ros_bridge/web
python3 -m http.server 8081

# Access dashboard
open http://localhost:8081

Dashboard URLs

Dashboard URL Purpose
Control Dashboard http://localhost:8081 Robot control + shadow metrics
3D Visualization http://localhost:8080 Gazebo/3D view (in ros2_jazzy)
Grafana http://localhost:3000 System monitoring

WebSocket Connection

The dashboard connects to the bridge via WebSocket:

  • URL: ws://localhost:8765
  • Protocol: JSON messages
  • Auth: JWT token (if enabled)

Full Dashboard Guide โ†’


Installation

Prerequisites

  • Python 3.11+
  • ROS1 (Noetic) or ROS2 (Humble/Jazzy)
  • Docker (optional, for simulation)

PyPI Install

pip install agent-ros-bridge

Docker Install

docker pull agent-ros-bridge:jazzy-with-nav2
docker run -it agent-ros-bridge:jazzy-with-nav2

Development Install

git clone https://github.com/webthree549-bot/agent-ros-bridge.git
cd agent-ros-bridge
pip install -e ".[dev]"

Testing

# Run all tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=agent_ros_bridge --cov-report=html

# Run safety-critical tests only
pytest tests/unit/safety/ -v

# Run simulation tests (requires Docker)
pytest tests/e2e/ -v

Current Status:

  • 2,021 tests passing
  • 65% code coverage
  • Gate 2 validation: PASSED (95.93% success)

Safety Certification Roadmap

Milestone Target Status
Shadow Mode Data 200 hours ๐ŸŸก In Progress (0 hrs)
Agreement Rate >95% ๐ŸŸก In Progress (0%)
Simulation Validation 10K scenarios โœ… PASSED (95.93%)
ISO 10218 Review Q3 2026 โณ Planned
Insurance Review Q4 2026 โณ Planned

Community


Citation

If you use Agent ROS Bridge in research, please cite:

@software{agent_ros_bridge,
  title = {Agent ROS Bridge: Safety-First Production Gateway for AI-to-Robot Integration},
  author = {Agent ROS Bridge Contributors},
  year = {2026},
  url = {https://github.com/webthree549-bot/agent-ros-bridge}
}

License

MIT License - See LICENSE for details.


Built with safety in mind for production robotics deployments.
When robots matter, safety comes first.

About

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

Topics

Resources

License

Contributing

Security policy

Stars

18 stars

Watchers

0 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors