-
安装源
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
-
设置key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
-
更新
sudo apt-get update
-
安装ros melodic和rosinstall等便利工具
sudo apt-get install ros-melodic-desktop-full sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
-
解决依赖
sudo rosdep init rosdep update
初始化时可能会报错:
解决办法:
cd