Ubuntu18.04安装ROS出现的一些问题

执行 sudo rosdep init 出错

在执行 sudo rosdep init 报错 command rosdep not found

解决方法
安装python-rosdep

sudo apt install python-rosdep

安装完成后,执行sudo rosdep init

发现还存在问题
pkg_resources.DistributionNotFound: The ‘rosdep==0.19.0’ distribution was not found and is required by the application
Ubuntu18.04安装ROS出现的一些问题_第1张图片
这是由于ROS默认是python2,而自己系统python版本换到了python3造成的。
我们将系统python版本换到python2就可以了。
执行命令

sudo update-alternatives --config python

然后输入相应版本编号即可。
Ubuntu18.04安装ROS出现的一些问题_第2张图片

此时,再次执行 sudo rosdep init 成功
Ubuntu18.04安装ROS出现的一些问题_第3张图片

你可能感兴趣的:(Ubuntu18.04安装ROS出现的一些问题)