rosdep init和rosdep update出错处理
文章目錄
- 1. 開發(fā)環(huán)境
- 2. rosdep init出錯(cuò)
- 3. rosdep update出錯(cuò)
- 3.1 問題
- 3.2 解決方案:
- 3.3 新的解決方案
1. 開發(fā)環(huán)境
開發(fā)電腦是PC機(jī)+windows10系統(tǒng),在win10系統(tǒng)上裝虛擬機(jī),虛擬機(jī)上裝ubuntu20.04系統(tǒng)
2. rosdep init出錯(cuò)
sudo rosdep init 出錯(cuò)
手動(dòng)創(chuàng)建上面所述的目錄: /etc/ros/rosdep/sources.list.d ,自己創(chuàng)建20-default.list文件。
在終端輸入:
cd /etc
sudo mkdir ros
cd ros
sudo mkdir rosdep
cd rosdep
sudo mkdir sources.list.d
cd sources.list.d
sudo gedit 20-default.list
在gedit 20-default.list上粘貼下面的內(nèi)容:
#os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
#generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
#newer distributions (Groovy, Hydro, …) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
處理完之后不需要再執(zhí)行sudo rosdep init ,然后進(jìn)入下一步rosdep update
3. rosdep update出錯(cuò)
3.1 問題
因網(wǎng)絡(luò)問題可能會(huì)update出錯(cuò),如下圖
3.2 解決方案:
在下面文件添加https://ghproxy.com/
(1) /usr/lib/python3/dist-packages/rosdep2/gbpdistro_support.py
(2) /usr/lib/python3/dist-packages/rosdep2/sources_list.py
(3) /usr/lib/python3/dist-packages/rosdep2/rep3.py
(4) /usr/lib/python3/dist-packages/rosdistro/manifest_provider/github.py此文件兩個(gè)地方需要修改
(5) /usr/lib/python3/dist-packages/rosdistro/init.py
做上面修改后當(dāng)時(shí)rosdep update沒問題了,但后面再用發(fā)現(xiàn)又出相同的問題,判斷是網(wǎng)絡(luò)問題。
3.3 新的解決方案
思路:PC機(jī)插入TP-LINK無線網(wǎng)卡,這時(shí)把win10的PC機(jī)當(dāng)做一部手機(jī),通過WIFI連接到其他路由器上,這樣ubuntu20.04就可以使用無線網(wǎng)絡(luò)了。
(1) win10的PC機(jī)插入TP-LINUK,安裝好驅(qū)動(dòng)后,網(wǎng)絡(luò)適配這個(gè)可以看到無線網(wǎng)卡
(2) win10由使用有線網(wǎng)絡(luò)改為采用無線網(wǎng)絡(luò)
在網(wǎng)絡(luò)屬性中選擇自動(dòng)獲取IP地址,然后確定
確定后win10電腦任務(wù)欄,也就是電腦顯示屏右下角網(wǎng)絡(luò)圖標(biāo),點(diǎn)擊進(jìn)去后連接到無線路由器即可。這樣ubuntu使用的就是無線網(wǎng)絡(luò),然后再rosdep update就解決了問題。
總結(jié)
以上是生活随笔為你收集整理的rosdep init和rosdep update出错处理的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ROS初级教程1---官方ROS文件系统
- 下一篇: 理解ROS节点---ROS学习第4篇