RC2025/README.md
2025-07-07 02:48:47 +08:00

70 lines
1.6 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.

# RC2025 自动定位瞄准代码
基于ROS2的机器人自动定位与瞄准系统支持激光雷达建图和导航功能。
## 系统要求
- Ubuntu 22.04
- ROS2 Humble
- 激光雷达MID360
## 快速开始
### 1. 编译项目
```bash
./build.sh
```
### 2. 建图模式
用于创建环境地图和点云数据:
```bash
./mapping.sh
```
**建图前配置:**
1. 修改 `mapping.sh` 中的地图保存文件名(将 `RC2025` 改为您的项目名)
2. 同步修改 `src/rm_nav_bringup/config/reality/fastlio_mid360_real.yaml` 中的 pcd 文件名
**建图操作:**
- 保存点云文件:`ros2 service call /map_save std_srvs/srv/Trigger`
- 保存地图:确保地图名称保持一致
### 3. 导航模式
使用已建立的地图进行导航:
```bash
./nav.sh
```
## 重要参数配置
### 激光雷达安装位置
**位置参数配置:**
- 文件:`src/rm_nav_bringup/config/reality/measurement_params_real.yaml`
- 修改:`x`, `y`, `z` 坐标
- 注意:不要修改 `rpy` 参数
**姿态参数配置:**
- 文件:`src/rm_nav_bringup/config/reality/MID360_config.json`
- 修改:`yaw`, `pitch`, `roll` 角度
- 注意:不要修改 `xyz` 参数
### 地面点云分割
- 文件:`src/rm_nav_bringup/config/reality/segmentation_real.yaml`
- 参数:`sensor_height`(激光雷达距离地面的高度)
- 参数:`max_dist_to_line`(地面点云分割的最低高度)
- 说明:此参数影响地面点云的正确分割
### 目标点设定
- 文件:`nav.sh`
- 参数:篮筐目标点的 `x``y` 坐标
- 用途:设定机器人瞄准的目标点