Files
Vision/docs/front-end_ROS.md
T
dev01 0d40e0fabf docs: 文档整理,与前端对接文档.md 替换为 API.md + front-end_ROS.md
- 新增 docs/API.md(HTTP API 数据格式)
- 新增 docs/front-end_ROS.md(前端 ROS 话题格式)
- 新增 docs/底盘通信协议指南.md(底盘串口协议)
- 删除 docs/与前端对接文档.md
- 云台通信协议指南补充 0xA9 前馈帧说明
- 修正 README API 路径及 ROS 话题引用
- .gitignore 添加 workspace/data/
2026-06-07 13:54:07 +08:00

56 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ROS 话题格式
通过 rosbridge WebSocket(`ws://192.168.0.11:9090`)发布,均为单向 `publish`(前端 → ROS),无订阅。
---
## 1. `/cmd_chassis` — 底盘控制
**类型:** `std_msgs/Float32MultiArray`
**格式:**
```json
{
"layout": { "dim": [], "data_offset": 0 },
"data": [0.5, 0.0]
}
```
`data` 字段:
| 索引 | 含义 | 单位 | 来源常量 |
|------|------|------|---------|
| `data[0]` | 线速度 | m/s | `BASE_SPEED` (0.5) |
| `data[1]` | 角速度(偏航) | 度/秒 | `YAW_VELOCITY` (1.0) |
---
## 2. `/cmd_gimbal` — 云台控制
**类型:** `geometry_msgs/Twist`
**格式:**
```json
{
"linear": { "x": 0, "y": 0, "z": 0 },
"angular": { "x": 0, "y": 10.0, "z": 0 }
}
```
`angular` 字段:
| 字段 | 含义 | 单位 | 来源常量 |
|------|------|------|---------|
| `angular.y` | 俯仰角速度 (pitch) | 度/秒 | `GIMBAL_PITCH_DEG_S` (10) |
| `angular.z` | 偏航角速度 (yaw) | 度/秒 | `GIMBAL_YAW_DEG_S` (10) |
`linear` 字段保留填零,云台无平移运动。
---
## 3. 发布频率
发布频率常量 `PUBLISH_RATE = 30` Hz,但在 ManualMode 中实际采用 on-demand 模式:仅当键盘按住、且速度值有变化时才发布。