ROS安装过程遇到的问题及解决方法

任务

成功安装Ubuntu后,乘胜追击,安装ROS系统.
根据我下载Ubuntu的18.04版本长期支持至2023年,同时,相对应的ROS的Melodic版本也长期支持至2023年.固下载此版本.
根据官网的指示一步步安装即可.
但简要的几个步骤也是坎坷不断,辗转下,终获成功.

rosdep 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]:
<urlopen error [Errno 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
<urlopen error [Errno 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
Failed to download target platform data for gbpdistro:
<urlopen error [Errno 104] Connection reset by peer>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
<urlopen error <urlopen error [Errno 104] Connection reset by peer> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

在更改时间限制有所好转但仍未成功后,明确得知,是网络原因.
可以尝试***更换网络***,用***手机热点连接***等方式解决.
我身边没有合适网络,忍痛决定,购买代理,最终一次成功.
success

The following packages have unmet dependencies: python-rosinstall

最后一步安装依赖包,总提示无法安装。

 python-rosinstall : Depends: python-vcstools (>= 0.1.38) but it is not going to be installed
                     Depends: python-wstool (>= 0.1.12) but it is not going to be installed
                     Depends: mercurial but it is not installable
E: Unable to correct problems, you have held broken packages.

通过步骤包含的链接http://wiki.ros.org/rosinstall,可以自主完成下载

首先通过下载pip,按照官方下载指导,直接命令行输入

sudo apt-get install python-pip

pip基本工具需要这种安装方法即可成功完成,下一步是

sudo pip install -U rosinstall

同样出现问题如下:

ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

此问题同样是网络原因,通过pip下载默认访问国外网站资源,国内网络访问超时。这篇博客方法有效:更改pip源 / 解决 ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read
通过在安装命令中加入-i [pip 源]即可访问国内镜像网站快速下载资源。例如,如下命令表示通过豆瓣镜像网站https://pypi.douban.com/simple安装rosinstall

 sudo pip install -i https://pypi.douban.com/simple rosinstall

就此,完成基本的工具下载。

发布了52 篇原创文章 · 获赞 8 · 访问量 9684

猜你喜欢

转载自blog.csdn.net/cascara/article/details/104696038