RobotKernal-UESTC/Docs/1.ROS环境安装.md

70 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ROS环境安装
> 本文档用于指导在RK3588上安装ROS的教程经过测试刷机后的裸系统按照步骤安装运行即可。
>
> 更新时间2024-01-27
> - 硬件Firefly-ROC-RK3588S-PC
> - 系统固件ROC-RK3588S-PC_Ubuntu20.04-Gnome-r30028_v1.1.1b_230914.7z
> - 系统固件下载百度云链接https://pan.baidu.com/s/1NW9SuyuZSmhWSPJJVCrKBg 提取码k5r3
> - 团队私有网盘http://logzhan.ticp.io:52440 账号uestc 密码123
> - 验证方法:刷机后新安装
> - 验证人: 李瑞瑞、詹力 2024-01-27
### 1. 添加ROS软件源将以下命令复制到ubuntu的终端执行
```sh
# 换中国技术大学源可以全部都换这个只换ros
sudo sh -c '. /etc/lsb-release && echo "deb <http://mirrors.ustc.edu.cn/ros/ubuntu/> $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
```
### 2. 添加ROS软件源
```shell
# 这个指令需要执行后才能执行 sudo apt update, 否则经过测试会报错
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
```
### 3. 开始安装ROS
```shell
# 更新apt, 如果不更新可能会导致无法定位软件包的问题
sudo apt update
sudo apt install ros-noetic-desktop-full
sudo apt-get install python3-pip
sudo pip3 install 6-rosdep
sudo 6-rosdep
sudo rosdep init
rosdep update
```
### 4. 设置环境变量
```shell
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
### 5. 安装rosinstall
```shell
sudo apt install python3-rosinstall python3-rosinstall-generator python3-wstool
```
### 6. 安装检查
经过实验,下面两个库在前面的步骤已经安装完成,下面步骤主要是检查所需要的库是否安装全。
```shell
sudo apt install ros-noetic-desktop-full
# 安装libgtk主要是用于支持图像显示
sudo apt-get install libgtk2.0-dev
# apt-get无法安装时可以采用aptitude安装,
# 如果没有安装aptitude
sudo apt-get install aptitude
sudo aptitude install libgtk2.0-dev
```