Skip to content

About

LLM | Agent

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

ROS LLM Agent

基于 Mini Claude 的 ROS 机器人智能体。让 Agent 感知和操控 ROS 系统。

功能

  • ROS 系统感知 — 列出 topic/node/service/param,echo 话题消息,查看计算图
  • ROS 系统控制 — 调用 service、设置参数、启动 launch 文件、kill node
  • 无人机控制 — 起飞/降落/移动/航点飞行/旋转
  • 数学计算 — 30 个数学工具(三角函数/统计/几何等)
  • Mini Claude 完整能力 — 文件读写、代码编写、shell 执行、子 agent 等

Demo

安装

cd ros_llm_agent
pip install -e .

使用

交互式 REPL:

ros-claude

单次查询:

ros-claude "列出所有 ROS topic"

Python API:

from robot_driver import RobotAgentDriver
driver = RobotAgentDriver()
result = driver.invoke("查看 /cmd_vel 的消息")

配置

创建 .env 文件:

OPENAI_API_KEY=sk-xxx
OPENAI_BASE_URL=https://your-api-endpoint/v1
DEEPSEEK_MODEL=deepseek-v4-flash

可用命令

命令 作用
/tools 列出所有可用工具
/clear 清空对话历史
/plan 切换计划模式
/cost 查看 token 用量
/compact 压缩上下文
/memory 查看记忆
/skills 查看技能

输入 / 后按 Tab 可自动补全命令。

项目结构

ros_llm_agent/
├── mini_claude/          # LLM Agent 引擎
│   ├── agent.py          # 主循环(Anthropic / OpenAI)
│   ├── tools.py          # 工具执行引擎
│   └── prompt.py         # 系统提示词
│
├── robot_driver/         # 机器人驱动层
│   ├── cli.py            # ros-claude 命令行入口
│   ├── driver.py         # RobotAgentDriver 主类
│   ├── prompts.py        # ROS 场景提示词
│   ├── utils.py          # 工具函数
│   └── tools/            # 原生 ToolDef 工具
│       ├── ros_tools.py      # 21 个 ROS 工具
│       ├── math_tools.py     # 30 个数学工具
│       └── drone_tools.py    # 8 个无人机工具
│
└── pyproject.toml

🙏 致谢

感谢作者Windy3f3f3f3f开源.

About

LLM | Agent

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages