标题(Ubuntu18.04 melodic 安装与下载ROS
Ubuntu系统允许restricted(不完全的自由软件)、universe(Ubuntu官方不提供支持与补丁,全靠社区支持)、multiverse(非自由软件,完全不提供支持和补丁)这三种软件源。
sources.list是Ubuntu系统保存软件源地址的文件,位于/etc/apt/目录下,在这一步中我们需要将 ROS的软件源地址添加到该文件中。
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'
- 添加密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
3 安装ROS
$ sudo apt update
$ sudo apt install ros-melodic-desktop-full
4.初始化rosdep
sudo rosdep init
rosdep update
ubantu18.04安装rose出现常见问题
ERROR:cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down
解决方法1
sudo gedit /etc/hosts
#在文件末尾添加
151.101.84.133 raw.githubusercontent.com
保存后
sudo rosdep init
解决方法2
sudo c_rehash /etc/ssl/certs
sudo -E rosdep init
rosdep update
如果还是出错更换清华源mirrors.tuna.tsinghua.edu.cn
网络切位手机热点
sudo apt update
rosdep update
出错
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
输入
sudo apt-get update
sudo apt-get install python-rosdep
- 设置环境变量
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc
6 安装rosinstall,便利的工具
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential