Unitree Go2 MCP 服务器 是一个基于模型上下文协议(MCP)构建的服务器,它允许用户通过大型语言模型(LLM)解释的自然语言命令来控制 Unitree Go2 机器人。这些命令被转换成 ROS2 指令,使机器人能够执行相应的动作。
<a href="https://glama.ai/mcp/servers/@lpigeon/unitree-go2-mcp-server"> <img width="380" height="200" src="https://gips2.baidu.com/it/u=3941420758,3695950690&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Unitree Go2 服务器 MCP 服务器" /> </a>您可以在 MCPFUNCTIONS.md 中找到功能列表。
unitree_ros2 环境https://github.com/unitreerobotics/unitree_ros2
步骤 2:连接并测试。git clone https://github.com/lpigeon/unitree-go2-mcp-server.git
cd unitree-go2-mcp-server
uvuv:curl -LsSf https://astral.sh/uv/install.sh | sh
或者
pip install uv
uv venv
source .venv/bin/activate
将 MCP 设置配置到 mcp.json 文件中。
请注意,必须在连接到 Go2 的计算机上进行配置。
{
"mcpServers": {
"unitree-go2-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/unitree-go2-mcp-server",
"run",
"server.py"
]
}
}
}
如果您使用 Claude Desktop,可以使用以下命令找到 mcp.json:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
您可以安装 Claude Desktop 来使用 claude-desktop-debian。
code ~/.config/Claude/claude_desktop_config.json
code $env:AppData\Claude\claude_desktop_config.json
UNITREE_ROS2_SETUP_SH_PATH。server.py 并更改您的 UNITREE_ROS2_SETUP_SH_PATH(例如 /home/lpigeon/unitree_ros2/setup.sh)rosbridge,则需要设置 IP 和端口以连接 rosbridge(可选)。server.py 并更改您的 LOCAL_IP、ROSBRIDGE_IP 和 ROSBRIDGE_PORT。(ROSBRIDGE_PORT 的默认值是 9090)在终端中输入以下命令。
ros2 topic list
您应该看到以下主题:
/wirelesscontroller
如果看不到该主题,请检查 Go2 机器人与网络之间的连接。
unitree-go2-mcp-server 的 AI 系统。当您输入类似“看起来 Go2 有点累了”这样的命令时,LLM 会根据上下文进行解释——理解机器人可能需要休息或做一些伸展运动!
<center><img src="https://github.com/lpigeon/unitree-go2-mcp-server/blob/main/img/contextual_understanding.gif" width="800"/></center>这个任务是一个综合演示任务,展示了 Unitree Go2 机器人避障、转向和用户交互的能力。
<center><img src="https://github.com/lpigeon/unitree-go2-mcp-server/blob/main/img/task_test.gif" width="800"/></center>欢迎贡献! 无论是修复拼写错误、添加新功能还是提出改进建议,您的帮助都是宝贵的。 请参阅 贡献指南 了解如何为本项目做出贡献的详细信息。