Ubuntu18.04 ROS Melodic安装与卸载

1.设置软件源

国外源:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

国内源(USTC, China):

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.设置密匙

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

3.安装ROS

sudo apt-get update
sudo apt-get install ros-melodic-desktop-full

4.初始化rosdep

sudo rosdep init
rosdep update

5.安装rosinstall

sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

6.添加环境配置

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

7.测试安装

roscore

未出错即可。

卸载:

sudo apt-get remove ros-*

 

你可能感兴趣的:(ROS)