文章目錄
任務
成功安裝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)>
在更改時間限制有所好轉但仍未成功後,明確得知,是網絡原因.
可以嘗試***更換網絡***,用***手機熱點連接***等方式解決.
我身邊沒有合適網絡,忍痛決定,購買代理,最終一次成功.
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
就此,完成基本的工具下載。