CentOS 7.6安装ros
时间: 2024-06-19 09:03:17 浏览: 239
安装ROS需要先添加ROS源,具体步骤如下:
1. 添加ROS源:
```bash
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源key:
```bash
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
```
3. 更新软件包列表:
```bash
sudo apt-get update
```
4. 安装ROS:
```bash
sudo apt-get install ros-melodic-desktop-full
```
5. 初始化rosdep:
```bash
sudo rosdep init
rosdep update
```
6. 配置环境:
```bash
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
```
7. 创建工作空间:
```bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
```
至此,ROS已成功安装并配置好。
阅读全文