# leo_agv_ws
**Repository Path**: nxrobo/leo_agv_ws
## Basic Information
- **Project Name**: leo_agv_ws
- **Description**: 狮子座AGV工作空间
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-11-04
- **Last Updated**: 2025-12-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# NXROBO Leo
# 列表 Table of Contents
* [功能包说明 packages-overview](#功能包说明-packages-overview)
* [使用 usage](#使用-usage)
* [功能展示 Function Display](#功能展示-function-display)
# 功能包说明 packages-overview
- **leo_agv:** 狮子座底盘功能工作空间
- **src:** Leo底盘的源代码,包括底层配置、硬件驱动和各个应用功能包等
- **doc:** 驱动安装脚本文件
- **ws_iron_moveit2:** 狮子座机械臂功能工作空间
- **src:** 机械臂的源代码,包括C3、ES3和ES5三款机械臂的底层配置和硬件驱动
# 使用 usage
### 系统要求 Prequirement
- System: Ubuntu 22.04+
- ROS Version: Humble (Desktop-Full Install)
### **下载安装** Download and install
- 下载工作空间 Download the workspace:
```shell
git clone https://gitee.com/nxrobo/leo_agv_ws.git
```
### **编译运行** Build and run
- 编译**ws_iron_moveit2**工作空间 Build ws_iron_moveit2 workshop
```shell
cd leo_agv_ws/ws_iron_moveit2/
colcon build --executor sequential
```
- 配置环境文件 Setting path file
```
gedit ~/.bashrc
```
- 然后检查文件内是否存在下方内容,无则添加 **(否则机械臂功能将无法正常运行)** Check if the following content in the file. if not, add it
- 机器在出厂前已默认配置该环境 This configuration already by default
```
source ~/leo_agv_ws/ws_iron_moveit2/install/setup.bash
```
- 编译**leo_agv**工作空间 Build leo_agv workshop
```shell
cd leo_agv_ws/leo_agv/
colcon build
```
- 如果编译一切正常,可根据提示运行相关例程。If everything goes fine, test the examples as follow:
```shell
cd leo_agv_ws/leo_agv
./onekey.sh
```
### 程序更新 Program Update
- (非必须)进入到工作空间下,可进行代码更新,输入以下指令:
```shell
cd leo_agv_ws/
git pull
```
# 参数说明 Arguments description
Launch file arguments description
### camera_type_tel
深度摄像头的型号,其对应值如下表。The model type of the depth camera, and the corresponding values can be seen below...
| **Camera** **version** | **CAMERATYPE** **value** |
| ---------------------- | ------------------------ |
| Intel RealSense D435 | "d435" |
### RGB
深度摄像头的RGB信息topic,其对应值如下表。The RGB information topic of the depth camera, and the corresponding values can be seen below...
| **Camera** **version** | **RGBTopic** **value** | **Description** |
| ---------------------- | ---------------------------------- | -------------------------------------------- |
| Intel RealSense D435 | "/camera/camera/color/image_raw" | 底盘摄像头RGB图像话题 Base camera RGB Topic |
| | "/camera1/camera1/color/image_raw" | 机械臂摄像头RGB图像话题 Arm camera RGB Topic |
### Depth
深度摄像头的深度信息topic,其对应值如下表。The depth information topic of the depth camera, and the corresponding values can be seen below...
| **Camera** **version** | **DepthTopic** **value** | **Description** |
| ---------------------- | --------------------------------------- | ----------------------------------------------- |
| Intel RealSense D435 | "/camera/camera/depth/image_rect_raw" | 底盘摄像头深度图像话题 Base camera Depth Topic |
| | "/camera1/camera1/depth/image_rect_raw" | 机械臂摄像头深度图像话题 Arm camera Depth Topic |
### lidar_type_tel
激光雷达的型号,其对应值如下表。The model type of the lidar, and the corresponding values can be seen below...
| **Lidar** **version** | **LIDARTYPE** **value** |
| --------------------- | ----------------------- |
| YDLIDAR G6 | "ydlidar_g6" |
### slam_type
SLAM的算法,其对应值如下表。The algorithm of the SLAM, and the corresponding values can be seen below...
| **SLAM** **algorithm** | **SLAMTYPE** **value** |
| ---------------------- | ---------------------- |
| Gmapping | "gmapping" |
| Cartographer | "cartographer" |
| slam_toolbox | "slam_toolbox" |
### base_type
Leo底盘驱动方式,其对应值如下表。Leo chassis drive mode, and the corresponding values can be seen below...
| Driver mode | **LEO_DRIVER** **value** |
| ----------- | ------------------------ |
| Diff | "diff" |
### arm_type_tel
机械臂的型号,其对应值如下表。The model type of arm, and the corresponding values can be seen below...
| Arm version | **LEO_DEVICE** **value** |
| ----------- | ------------------------ |
| AUBO_ES5 | "aubo_ES5" |
| AUBO_ES3 | "aubo_ES3" |
| None | "None" |
### robot_ip
机械臂的IP地址,其对应值如下表。The ip address of arm, and the corresponding values can be seen below...
| Ip address | **DEVICE_IP value** |
| -------------- | ------------------- |
| 192.168.47.101 | "192.168.47.101" |
| None | "None" |
# 功能展示 Function Display
**1. Leo 跟随 Leo-Follower**
```shell
cd leo_agv_ws/leo_agv
source install/setup.bash
ros2 launch leo_follower leo_follower.launch.py camera_type_tel:='d435' lidar_type_tel:='ydlidar_g6' base_type:='diff' enable_arm_tel:='true' arm_type_tel:='aubo_ES3' robot_ip:='192.168.47.101'
```
- **camera_type_tel** : 填写对应摄像头型号。 **camera_type_tel** fill in the corresponding camera model
- **lidar_type_tel** : 填写对应激光雷达型号。 **lidar_type_tel** fill in the corresponding LiDAR model
- **base_type** : 填写对应底盘驱动方式。 **base_type** fill in the corresponding chassis drive mode
- **enable_arm_tel** : 是否启动机械臂。 **enable_arm_tel** activate the robotic arm
- **arm_type_tel** : 填写对应机械臂型号。 **arm_type_tel** fill in the corresponding model of the robotic arm
- **robot_ip** : 填写对应机械臂有线IP地址。 **robot_ip** fill in the corresponding IP address of the robotic arm
**2. Leo 2D建图 Leo -SLAM-2DMapping**
```shell
cd leo_agv_ws/leo_agv
source install/setup.bash
ros2 launch leo_slam_transfer start_build_map_gmapping.launch.py camera_type_tel:='d435' lidar_type_tel:='ydlidar_g6' base_type:='diff' enable_arm_tel:='true' arm_type_tel:='aubo_ES3' robot_ip:='192.168.47.101' rviz_config:='leo_arm_gmapping.rviz'
```
**3. Leo-RtabMap建图 Leo-RtabMap-Mapping**
```shell
cd leo_agv_ws/leo_agv
source install/setup.bash
ros2 launch leo_rtab_map start_rtabmap_rgbd_sync.launch.py camera_type_tel:='d435' lidar_type_tel:='ydlidar_g6' localization:='false' base_type:='diff' enable_arm_tel:='true' arm_type_tel:='aubo_ES3' robot_ip:='192.168.47.101' rviz_config:='leo_arm_rtabmap.rviz'
```
**4. Leo导航 Leo-Navigation**
```shell
cd leo_agv_ws/leo_agv
source install/setup.bash
ros2 launch leo_navigation2 start_leo_navigation2.launch.py camera_type_tel:='d435' lidar_type_tel:='ydlidar_g6' base_type:='diff' enable_arm_tel:='true' arm_type_tel:='aubo_ES3' robot_ip:='192.168.47.101' rviz_config:='leo_arm_navigation2.rviz'
```
# LEO型号配置
> 源文件路径:/home/leo/leo_agv_ws/leo_agv/doc/driver_install.sh
>
打开终端,执行以下命令运行安装脚本
```Bash
cd leo_agv_ws/leo_agv/doc
sudo ./driver_install.sh
```
输入密码:leo,回车运行
根据狮子座当前配置选择对应选项,狮子座默认底盘类型为**差速底盘,**输入`1`回车确定:
同理,带有独立控制柜的机械臂型号为`aubo_C3`,如果狮子座未有安装机械臂则选择`None`,这里选择狮子座机械臂型号为**aubo_ES3,**输入`2`回车确定:
最后输入先前在**遨博STUDIO**配置的**机械臂IP**及**摄像头数量**即可,其中机械臂IP默认为:**192.168.47.101。**
# 相机显示校正
> 源文件路径:/home/leo/leo_agv_ws/leo_agv/doc/chcam.sh
>
**安装脚本所需系统包**
```Bash
sudo apt-get install dbus-x11
```
打开终端,执行以下命令运行安装脚本
```Bash
cd leo_agv_ws/leo_agv/doc
sudo ./chcam.sh
```
输入密码:leo,回车运行
狮子座在只安装一个相机的情况下,在终端输入`n`,即可完成校正
## **1. 双相机图像切换**
**base camera、arm camera**分别为**底盘相机画面**与**机械臂相机画面。**
如启动后画面如上所示,底盘相机对应**base camera**,机械臂相机画面对应**arm camera**;则在终端输入`n`,回车确认即可。
## 2. 画面相反情况
这种情况为底盘相机与机械臂相机位置相反,此时在终端输入`y`,即切换成功。
## 3. 在ROS中查看校正结果
启动onekey脚本,选择第一个demo
```Bash
cd leo_agv_ws/leo_agv
./onekey.sh
```
切换两个相机话题查看图像
## **4. 校正标准**
`camera`话题要正确显示**底盘相机**图像;`camera1`话题显示**机械臂相机**图像
### **校正结果最终以ROS端为准!**