Ubuntu 18.04 安装ros
时间: 2023-12-22 22:25:04 浏览: 99
ubuntu18.04安装ROS
安装ROS(Robot Operating System)需要以下步骤:
1. 添加ROS软件源:打开终端,输入以下命令:
```
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
```
2. 添加ROS公钥:输入以下命令:
```
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
```
3. 更新软件包索引:输入以下命令:
```
sudo apt update
```
4. 安装ROS:输入以下命令:
```
sudo apt install ros-melodic-desktop-full
```
5. 初始化rosdep:输入以下命令:
```
sudo rosdep init
rosdep update
```
6. 设置环境变量:输入以下命令:
```
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
7. 安装rosinstall:输入以下命令:
```
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
```
阅读全文