KG

kvgork/gazebo-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 8 forks 质量 77 趋势 14MIT

Gazebo的MCP服务器。主要用Claude制作

概览

使像Claude这样的AI助手能够控制凉亭模拟,生成和管理模型,查询世界和物理属性,驾驶机器人,并通过标准化MCP接口收集传感器数据。 服务器会暴露 。完整的每个工具列表请参见可用 MCP 工具。 - 从URDF/SDF文件或XML字符串生成模型 - 在仿真中列出、删除和查询模型 - 设置模型姿态和速度(传送/设定速度) - 用于物理测试施加力和力矩 - 按型号/类型列出带滤波的传感器 - 读取最新传感器数据(摄像头、深度、RGBD、IMU、激光雷达、GPS、接触式、力/扭矩、磁力计、高度计、声纳)- 订阅传感器主题并缓存流数据 - 验证并加载世界文件;保存当前世界 - 查询物理、重力和场景属性 - 更新世界属性并设置重力矢量(地球、月球、零重力、自定义) - 暂停、恢复和重置仿真- 设置仿真速度和查询仿真时间/性能指标-...

概述(AI 翻译)

ROS2 凉亭模拟模型上下文协议服务器

使像Claude这样的AI助手能够控制凉亭模拟,生成和管理模型,查询世界和物理属性,驾驶机器人,并通过标准化MCP接口收集传感器数据。

特色

服务器在5个类别中暴露了27个MCP工具。完整的每个工具列表请参见可用MCP工具。

模特管理

  • 从 URDF/SDF 文件或 XML 字符串生成的模型
  • 模拟中的列表、删除和查询模型
  • 设定模型姿势和速度(瞬移/设定速度)
  • 施加力和扭矩用于物理测试

传感器集成

  • 按型号/类型列出带有过滤功能的传感器
  • 读取最新传感器数据(相机、深度、RGBD、IMU、激光雷达、GPS、接触、力/扭矩、磁力计、高度计、声纳)
  • 订阅传感器主题并缓存流式数据

世界工具

  • 验证并加载世界文件;保存当前世界
  • 查询物理、重力和场景属性
  • 更新世界属性并设置重力矢量(地球、月球、零重力、自定义)

模拟控制

  • 暂停、恢复和重置模拟

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Gazebo MCP Server

ROS2 Model Context Protocol Server for Gazebo Simulation

Enable AI assistants like Claude to control Gazebo simulations, spawn and manage models, query world and physics properties, drive robots, and gather sensor data through a standardized MCP interface.

Features

The server exposes 27 MCP tools across 5 categories. See Available MCP Tools for the full per-tool list.

Model Management

  • Spawn models from URDF/SDF files or XML strings
  • List, delete, and query models in the simulation
  • Set model pose and velocity (teleport / set velocity)
  • Apply force and torque for physics testing

Sensor Integration

  • List sensors with filtering by model/type
  • Read latest sensor data (camera, depth, RGBD, IMU, LiDAR, GPS, contact, force/torque, magnetometer, altimeter, sonar)
  • Subscribe to a sensor topic and cache streamed data

World Tools

  • Validate and load world files; save the current world
  • Query physics, gravity, and scene properties
  • Update world properties and set the gravity vector (Earth, Moon, zero-g, custom)

Simulation Control

  • Pause, unpause, and reset the simulation
  • Set simulation speed and query simulation time / performance metrics
  • Get comprehensive simulation status and list active worlds

ROS2 Tools

  • List ROS2 topics and inspect topic info
  • Publish velocity (twist) commands to drive a robot
  • Look up TF transforms between coordinate frames
  • Spawn models from SDF/URDF XML and read joint states

Developer Experience & Debugging

  • Add and clear visual debug markers; highlight models
  • Generate RViz2 launch and visualization-panel instructions
  • Record and play back simulations via rosbag (ros2 bag commands)
  • Save and restore simulation snapshots for regression testing
  • Profile performance and identify bottlenecks

Note: Tools gracefully fall back to mock data when Gazebo is not running, so the server is usable for development and testing without a live simulator.

Quick Start

Prerequisites

  • ROS2: Humble or Jazzy (LTS recommended)
  • Gazebo: Modern Gazebo (Fortress, Garden, or Harmonic) - Primary Support
    • ⚠️ Classic Gazebo 11 is deprecated and will be removed in v2.0.0
  • Python: 3.10 or higher
  • OS: Ubuntu 22.04 or 24.04 (recommended)

Installation

There are two ways to install: pixi (recommended — self-contained, no apt/system ROS2 needed) or a manual ROS2 + pip setup.


在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gazebo": { "command": "pixi", "args": ["run", "--manifest-path", "/path/to/gazebo-mcp/pixi.toml", "serve"] } } }