内容
<div align="center">
<img src=".github/assets/scry-banner.svg" alt="Scry, AI for ROS 2 robots" width="100%">
# Scry
**你的 ROS 2 机器人在你的口袋里。** 从你的安卓手机调试、监控和与任何 ROS 2 系统对话,通过设备上的 AI 助手。
[](https://github.com/phaneron-robotics/scry-app/releases)
[](https://pypi.org/project/scry-connect/)
[](https://github.com/phaneron-robotics/scry-app/actions/workflows/ci.yml)
[](https://github.com/phaneron-robotics/scry-connect/actions/workflows/ci.yml)
[](https://phaneron-robotics.github.io/scry/get-started/install-connect/)
[](#license)
[**文档**](https://phaneron-robotics.github.io/scry/) ·
[**快速开始**](https://phaneron-robotics.github.io/scry/get-started/) ·
[**工作原理**](https://phaneron-robotics.github.io/scry/how-it-works/) ·
[**演示**](https://phaneron-robotics.github.io/scry/demos/)
<a href="https://play.google.com/store/apps/details?id=com.phaneronrobotics.scry"><img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" alt="在 Google Play 上获取" height="56"></a>
</div>
---
## 什么是 Scry?
调试 ROS 2 机器人通常意味着蹲在笔记本电脑前,打开 `rviz`、`rqt` 和一堆 `ros2 topic echo` 终端。这在你的办公桌上还不错,但在机器人旁边、演示或在现场时就很痛苦。 **Scry 将整个工作流程放在你的口袋里:** 你用日常语言提问,比如 *"为什么 `/cmd_vel` 不发布?"*,设备上的 AI 助手通过网络检查机器人的话题、节点、服务、参数和诊断,然后用结构化的面板、图表和一键操作回答。无需云后端,无需遥测。你的 AI 密钥,你的机器人,你的网络。
---
## 演示
Scry 实际操作的简短演练。点击任意缩略图在 YouTube 上观看,或浏览 [完整播放列表](https://www.youtube.com/playlist?list=PLyorFDAYdKhSwHnjT1jQQy-Y-6_6wA7Kq)。
### AI 聊天和调试
| 调试日志 | 多步骤规划 | 手动审批 |
|---|---|---|
| [<img src="https://img.youtube.com/vi/iM--2T5NY4A/hqdefault.jpg" width="260">](https://youtu.be/iM--2T5NY4A) | [<img src="https://img.youtube.com/vi/URhuoBcetH8/hqdefault.jpg" width="260">](https://youtu.be/URhuoBcetH8) | [<img src="https://img.youtube.com/vi/Vc45jC7-fRA/hqdefault.jpg" width="260">](https://youtu.be/Vc45jC7-fRA) |
| 用日常语言询问机器人的日志。 | 观看 AI 构建和执行计划。 | AI 提出建议,你审批每个写入操作。 |
| 聊天演练 | 通过聊天设置参数 | 聊天中的摄像头画面 |
|---|---|---|
| [<img src="https://img.youtube.com/vi/V2PRj4fiPBo/hqdefault.jpg" width="260">](https://youtu.be/V2PRj4fiPBo) | [<img src="https://img.youtube.com/vi/zIMt096yqfY/hqdefault.jpg" width="260">](https://youtu.be/zIMt096yqfY) | [<img src="https://img.youtube.com/vi/ltE9LzJ3rTM/hqdefault.jpg" width="260">](https://youtu.be/ltE9LzJ3rTM) |
| 通过聊天调试机器人。 | 读取和设置 ROS 2 参数。 | 将实时摄像头画面带入聊天。 |
### 浏览 ROS 2 实体
| 浏览所有 ROS 2 实体 |
|---|
| [<img src="https://img.youtube.com/vi/hjJ-Rxm-khI/hqdefault.jpg" width="260">](https://youtu.be/hjJ-Rxm-khI) |
| 主题、节点、服务、操作、生命周期、参数、TF、日志 — 可搜索,一键详情。 |
### 实时可视化
| 摄像头、LiDAR、图表和 3D 场景 |
|---|
| [<img src="https://img.youtube.com/vi/dGKybk0HN8E/hqdefault.jpg" width="260">](https://youtu.be/dGKybk0HN8E) |
| 传感器流实时渲染在专用可视化界面。 |
### 机器人仪表盘和机队
| 机器人仪表盘 + 聊天 | 多机器人机队视图 |
|---|---|
| [<img src="https://img.youtube.com/vi/Xv22xBuKhKA/hqdefault.jpg" width="260">](https://youtu.be/Xv22xBuKhKA) | [<img src="https://img.youtube.com/vi/IS0pWNuMoMY/hqdefault.jpg" width="260">](https://youtu.be/IS0pWNuMoMY) |
| 一个诚实、一目了然的健康视图,搭配聊天。 | 在机器人之间切换或诊断整个机队。 |
---
## 工作原理
```mermaid
flowchart LR
User(["你\n文本 · 语音 · 图片"])
subgraph Phone["Scry 应用,安卓"]
AI["AI 助手\n+ MCP 路由\n+ 丰富渲染"]
end
subgraph Robot["你的机器人"]
Connect["scry-connect\nMCP 服务器"]
ROS["ROS 2 图\n任意 DDS / RMW"]
end
Cloud(["AI 提供商\nOpenRouter · Ollama"])
User <--> AI
AI <-->|"你的 Wi-Fi"| Connect
Connect <-->|"rclpy"| ROS
AI <-.->|"自带密钥 · 或完全本地"| Cloud
classDef brand fill:#292826,stroke:#A3B86C,stroke-width:1px,color:#E8E4D9
class Phone,Robot,AI,Connect,ROS brand
```
**手机是厚客户端。** 它运行 AI 循环,路由工具调用,渲染结果,保持后台监视器运行,并管理机队。 **机器人只需运行 `scry-connect`,** 一个小型 Python MCP 服务器,将其 ROS 2 图表公开为 **119 个 AI 调用工具**。读取操作免费;任何更改机器人状态的操作都需要你事先审批。由于云 AI API 无法访问你的私有 Wi-Fi,手机在 AI 和机器人之间代理每个工具调用,因此没有任何内容通过 Scry 服务器路由。
---
## 快速开始
大约十五分钟即可完成。完整的演练请参见 [**入门指南**](https://phaneron-robotics.github.io/scry/get-started/)。
### 1. 获取应用
<a href="https://play.google.com/store/apps/details?id=com.phaneronrobotics.scry">在 Google Play 上获取 Scry →</a>
### 2. 在机器人上安装 `scry-connect`
**pip**(最简单):
```bash
pip install scry-connect
source /opt/ros/$ROS_DISTRO/setup.bash
scry-connect
```
**Docker**(无需 Python 设置,多架构,适用于 Jetson / Pi):
```bash
docker run --rm --network host \
ghcr.io/phaneron-robotics/scry-connect:jazzy
```
它绑定 `0.0.0.0:5339`,仅限局域网,并打印启动时的配对二维码。
### 3. 配对和提问
在应用中扫描二维码,添加 [AI 提供商](#ai-providers),并提出你的第一个问题:
> *"我的机器人的健康状况如何?"*
[在安卓设备上安装](https://phaneron-robotics.github.io/scry/get-started/install-android/) ·
[安装 scry-connect](https://phaneron-robotics.github.io/scry/get-started/install-connect/) ·
[配对手机和机器人](https://phaneron-robotics.github.io/scry/get-started/pair/) ·
[第一次会话](https://phaneron-robotics.github.io/scry/get-started/first-session/)
---
## AI 提供商
自带密钥,或完全离线运行。提供商和模型从聊天顶部芯片中选择。
| 提供商 | 备注 |
|---|---|
| [**OpenRouter**](https://openrouter.ai/) | **推荐。** 一个密钥解锁 300+ 模型(Claude、GPT、Gemini、Llama 等),且有免费层。 |
| [**Ollama**](https://ollama.com/) | **在本地运行模型,** 在自己的机器上。无需云,无需密钥,完全离线。 |
Scry 通过你选择的提供商发送推理;它只存储 **你的凭证,** 绝不会存储你的机器人或聊天数据。
---
## 你可以做的事情
- **通过聊天调试。** 询问 *"为什么 `/cmd_vel` 不发布?"*,Scry 实时检查话题、节点、服务和参数,并解释它发现的内容。
- **语音和图片。** 无需动手, 或附上截图并询问 *"这个场景有什么问题?"*。语音转文本在手机上运行。
- **一键操作。** 发布话题、设置参数、调用服务或驱动生命周期更改。每个写入操作显示其内容并等待你的审批。
- **后台监视器。** 说 *"当 `/odom` 低于 10 Hz 时提醒我"*,Scry 监视并在条件触发时通知你。
- **实时面板和图表。** 传感器读数、场景快照、变换树和实时图表直接渲染在聊天中。
- **可视化选项卡。** 一个专用的、长时间运行的 3D 场景视图、摄像头画面、行为树、几何地图、实时图表、传感器面板、bag 文件播放和遥控。
- **机队视图。** 从一个屏幕监控和比较多个机器人。
---
## 文档
所有内容都在 **[phaneron-robotics.github.io/scry](https://phaneron-robotics.github.io/scry)**:
- **入门指南:** [概述](https://phaneron-robotics.github.io/scry/get-started/) · [安卓设备](https://phaneron-robotics.github.io/scry/get-started/install-android/) · [scry-connect](https://phaneron-robotics.github.io/scry/get-started/install-connect/) · [选择 AI](https://phaneron-robotics.github.io/scry/get-started/choose-ai/) · [配对](https://phaneron-robotics.github.io/scry/get-started/pair/) · [第一次会话](https://phaneron-robotics.github.io/scry/get-started/first-session/)
- **使用 Scry:** [聊天](https://phaneron-robotics.github.io/scry/use/chat/) · [附件](https://phaneron-robotics.github.io/scry/use/attachments/) · [语音](https://phaneron-robotics.github.io/scry/use/voice/) · [监视器](https://phaneron-robotics.github.io/scry/use/monitors/) · [远程](https://phaneron-robotics.github.io/scry/use/remote/)
- **工作原理:** [架构](https://phaneron-robotics.github.io/scry/how-it-works/)
- **参考:** [MCP 工具](https://phaneron-robotics.github.io/scry/reference/mcp-tools/) · [权限](https://phaneron-robotics.github.io/scry/reference/permissions/)
- **法律:** [隐私](https://phaneron-robotics.github.io/scry/legal/privacy/) · [数据安全](https://phaneron-robotics.github.io/scry/legal/data-safety/) · [安全](https://phaneron-robotics.github.io/scry/legal/security/)
---
## 鸣谢
Scry 建立在优秀的开源项目之上:
- [**ROS 2**](https://docs.ros.org/) 和 [**rclpy**](https://github.com/ros2/rclpy),Scry 与之交互的机器人图。
- [**模型上下文协议**](https://modelcontextprotocol.io/),`scry-connect` 实现的工具调用标准。
- [**OpenRouter**](https://openrouter.ai/) 和 [**Ollama**](https://ollama.com/),Scry 路由的推理层(云或完全本地)。
- [**Jetpack Compose**](https://developer.android.com/jetpack/compose),[**Hilt**](https://dagger.dev/hilt/),[**OkHttp**](https://square.github.io/okhttp/),[**Room**](https://developer.android.com/jetpack/androidx/releases/room),安卓应用栈。
---
## 许可证
Apache-2.0.
<div align="center">
<br>
由 <a href="https://www.phaneronrobotics.com/">Phaneron Robotics</a> 团队用 💚 制作。
</div>