YR

yutarop/ros-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

36 stars 6 forks 品質 60 トレンド 12MIT

ROS の MCP サーバーで、トピック、サービス、アクションを介してロボットを制御できます.

概要

rOS環境のロボットを自然言語で制御するためのMCPサーバです。 バラのトピック、サービス、行動によるコミュニケーションをサポートし、バラのメッセージタイプで動作します。 [https://github.com/user-attachments/assets/61143c37-fb73-4998-9cbc-844d92ae61d9] TurtleBot3 で gazebo を開き、トピックを公開して移動します。 サービスリストを表示し、Gazebo で世界をリセットするためにサービスを呼び出します。 アクションリストを表示し、TurtleBot3を1m先に動かすアクションを呼び出します。 - (socket server.py): localhost:8765 で動作する軽量なサーバーで、GUI 関連の操作を処理します。 MCP サーバーからローカルディスプレイ上のGazeboやrqt graphなどのツールを起動する手順が届きます。 - (ros-general.py): MCP を実装する Python ベースのサーバー。 自然言語入力を処理し、ROS コマンドにマップし、ソケットサーバーと通信します.

概要(AI 翻訳)

バラMCP

※ROS MCP**は、ROS環境でのロボットの制御用に設計されたMCPサーバーです。 バラのトピック、サービス、行動によるコミュニケーションをサポートし、バラのメッセージタイプで動作します。

デモ

ロスのトピック、サービス、アクションが使用できるかどうかを確認するテスト。

[https://github.com/user-attachments/assets/61143c37-fb73-4998-9cbc-844d92ae61d9]

####### 使用されるプロンプト(トピック)

TurtleBot3 で gazebo を開き、トピックを公開して移動します。

####### プロンプト(サービス)

サービスリストを表示し、Gazeboで世界をリセットするためにサービスを呼び出します。

####### プロンプト(アクション)

アクションリストを表示し、TurtleBot3を1m先に動かすアクションを呼び出します。

コンポーネント

  • ソケット サーバー ([socket_server.py)): localhost:8765 で動作する軽量なサーバーで、GUI 関連の操作を処理します。 MCP サーバーからローカル表示の Gazebo や rqt_graph などのツールを起動する手順が届きます。

-MCP Server (ros-general.py)): MCP を実装する Python ベースのサーバー。 自然言語入力を処理し、ROS コマンドにマップし、ソケットサーバーと通信します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

ROS MCP

ROS MCP is a MCP server designed for controlling robots in ROS environments using natural language. It supports communication via ROS topics, services, and actions, and works with any ROS message type.

Demo

Test to see if ros topics, services, and actions can be used.

https://github.com/user-attachments/assets/61143c37-fb73-4998-9cbc-844d92ae61d9

Prompt used (Topic)

Open gazebo with TurtleBot3 and publish topic to move it.

Prompt used (Service)

Show me service list and call service to reset the world in Gazebo.

Prompt used (Action)

Show me action list and call action to move the TurtleBot3 forward for 1m.

Components

  • Socket Server (socket_server.py): A lightweight server that runs on localhost:8765 to handle GUI-related operations. It receives instructions from the MCP server to launch tools such as Gazebo or rqt_graph on the local display.

  • MCP Server (ros-general.py): A Python-based server that implements the MCP. It processes natural language input, maps it to ROS commands, and communicates with the socket server. To enable node communication between the MCP server and the local machine, both must be configured with the same ROS_DOMAIN_ID on the same local network.

Overview of MCP Tools

  • Topic Management: List, monitor, and publish to ROS2 topics
  • Node Control: List and inspect running ROS2 nodes
  • Service Interaction: Call ROS2 services with custom
  • Action Support: Send goals to ROS2 actions
  • GUI Integration: Launch ROS2 GUI tools via WebSocket server
  • Environment Debugging: Check ROS2 setup and configuration
  • Process Management: Clean up running ROS2 processes

Please refer here for more details.

Getting Started

Requirements

  • ROS2 Humble Hawksbill (This project has only been tested with ROS2 Humble. Compatibility with other ROS2 distributions is not guaranteed.)
  • claude desktop (Linux, macOS and Windows)
  • Python 3.10+
  • websockets >= 15.0.1
  • uv package manager (Installing uv)
  • Other dependencies as listed in pyproject.toml

Installation

Git clone and install websockets package

git clone [email protected]:Yutarop/ros-mcp.git
cd ros-mcp
pip install "websockets>=15.0.1"

Activate .venv and install dependencies

uv venv
source .venv/bin/activate
uv pip install -e .
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →