日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > Ubuntu >内容正文

Ubuntu

ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法

發(fā)布時(shí)間:2023/12/20 Ubuntu 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

ROS1 noetic 版本在ubuntu20.04安裝出現(xiàn)問(wèn)題,rosdep update無(wú)法下載,網(wǎng)絡(luò)地址訪問(wèn)超時(shí)。

ROS1 noetic 版本在ubuntu20.04系統(tǒng)上的安裝方法見(jiàn)博客:Ubuntu Server 20.04 based on Raspberry- Pi-4B 安裝 ROS1 Noetic_Wogg的博客-CSDN博客

一、rosdep init問(wèn)題

1. sudo rosdep init 出現(xiàn)安全問(wèn)題

sudo rosdep init命令時(shí)出現(xiàn)訪問(wèn)安全性問(wèn)題,通過(guò)將

sudo vim /etc/apt/sources.list.d/ros-latest.list

在ros-latest.list文件中進(jìn)行修改?

deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ focal main改為:deb [trusted=yes]?http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ focal main

可以順利通過(guò)sudo rosdep init命令。

2. sudo rosdep init 出現(xiàn)網(wǎng)絡(luò)問(wèn)題

出現(xiàn)一下問(wèn)題:

ubuntu@ubuntu:~$ sudo rosdep init 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.

方法一: 增加raw.githubusercontent.com域名與ip之間的映射

$ sudo vim /etc/hosts151.101.84.133 raw.githubusercontent.com

方法二: 直接創(chuàng)建文件

sudo rosdep init ?作用就是在cd /etc/ros/rosdep/sources.list.d下創(chuàng)建下載列表20-default.list,網(wǎng)站掛掉,直接在相關(guān)文件夾下創(chuàng)建即可,無(wú)需再執(zhí)行命令

cd /etc/ros/rosdep/sources.list.d touch 20-default.list

?20-default.list文件內(nèi)容如下:

# os-specific listings first yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# generic yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml gbpdistro 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

二、rosdep update問(wèn)題

rosdep update 核心問(wèn)題就是raw.githubusercontent.com無(wú)法訪問(wèn),導(dǎo)致相關(guān)文件無(wú)法下載。

使用IP138?查詢r(jià)aw.githubusercontent.com,發(fā)現(xiàn)該域名已經(jīng)被禁止。

按照網(wǎng)上的方法,通過(guò)在/etc/hosts中添加域名解析的ip:【151.101.84:133 ?raw.githubusercontent.com】也無(wú)法解決,更換過(guò)多個(gè)ip也無(wú)濟(jì)于事。

將需要的文件下載到本地,然后指定文件的位置,即可解決該問(wèn)題。

1. 從github上下載所需要的rosdistro

git clone https://github.com/ros/rosdistro.git

git下載較慢,可從這里下載:?

rosdistro-master.zip-互聯(lián)網(wǎng)文檔類資源-CSDN下載

將下載好的包移動(dòng)到指定位置,例如:

sudo cp -r rosdistro /etc/ros

*** 也可不用移動(dòng),在下邊的步驟中將?20-default.list中的文件路徑指定到此包的相應(yīng)文件即可。

2. 更改sources.list.d

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

在20-default.list文件更改下載項(xiàng)所在的位置。

# os-specific listings first yaml file:///etc/ros/rosdistro/rosdep/osx-homebrew.yaml osx# generic yaml file:///etc/ros/rosdistro/rosdep/base.yaml yaml file:///etc/ros/rosdistro/rosdep/python.yaml yaml file:///etc/ros/rosdistro/rosdep/ruby.yaml gbpdistro file:///etc/ros/rosdistro/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

但是,此時(shí),還有部分文件仍然無(wú)法下載。

$ rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d Hit file:///etc/ros/rosdistro/rosdep/osx-homebrew.yaml Hit file:///etc/ros/rosdistro/rosdep/base.yaml Hit file:///etc/ros/rosdistro/rosdep/python.yaml Hit file:///etc/ros/rosdistro/rosdep/ruby.yaml ERROR: unable to process source [file:///etc/ros/rosdistro/releases/fuerte.yaml]:Failed to download target platform data for gbpdistro:<urlopen error timed out> Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml ERROR: error loading sources list:<urlopen error <urlopen error timed out> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

?此時(shí)需要修改index-v4.yaml所在的位置

3. 更改python中的ros相關(guān)下載項(xiàng)

ros noetic版本基于python3,所以在/usr/lib/python3路徑下修改,其他ros版本若基于python2的,需要找到對(duì)應(yīng)的python2 路徑進(jìn)行修改。

3.1 修改在__init__.py文件中修改index-v4.yaml的位置

sudo vim /usr/lib/python3/dist-packages/rosdistro/__init__.py #DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml' DEFAULT_INDEX_URL = 'file:///etc/ros/rosdistro/index-v4.yaml'

3.2在rep3.py中修改targets.yaml文件的位置?

sudo vim /usr/lib/python3/dist-packages/rosdep2/rep3.py # location of targets file for processing gbpdistro files #REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml' REP3_TARGETS_URL = 'file:///etc/ros/rosdistro/releases/targets.yaml'

4. 進(jìn)行更新

rosdep update ubuntu@ubuntu:/etc/ros/rosdep/sources.list.d$ sudo rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d Warning: running 'rosdep update' as root is not recommended.You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo. Hit file:///etc/ros/rosdistro/rosdep/osx-homebrew.yaml Hit file:///etc/ros/rosdistro/rosdep/base.yaml Hit file:///etc/ros/rosdistro/rosdep/python.yaml Hit file:///etc/ros/rosdistro/rosdep/ruby.yaml Hit file:///etc/ros/rosdistro/releases/fuerte.yaml Query rosdistro index file:///etc/ros/rosdistro/index-v4.yaml Skip end-of-life distro "ardent" Skip end-of-life distro "bouncy" Skip end-of-life distro "crystal" Skip end-of-life distro "dashing" Skip end-of-life distro "eloquent" Add distro "foxy" Add distro "galactic" Skip end-of-life distro "groovy" Skip end-of-life distro "hydro" Skip end-of-life distro "indigo" Skip end-of-life distro "jade" Skip end-of-life distro "kinetic" Skip end-of-life distro "lunar" Add distro "melodic" Add distro "noetic" Add distro "rolling" updated cache in /root/.ros/rosdep/sources.cache

enjoy!

參考:

rosdep update一定能通過(guò)簡(jiǎn)單方法rosdep update_努力是明天快樂(lè)的源泉-CSDN博客

解決ROS系統(tǒng) rosdep update超時(shí)問(wèn)題的新方法_leida_wt的博客-CSDN博客_rosdep update 超時(shí)

ros 中ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdist_果肉蟲的博客-CSDN博客

ubuntu18 ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/ros_蛇皮怪皮蛇的博客-CSDN博客
rosdep update 的解決_快樂(lè)男生總冠軍的博客-CSDN博客_rosdep update
Ubuntu 18.04.05 LTS配置ROS Melodic各種問(wèn)題詳細(xì)解決(填坑)_曉晨的博客-CSDN博客

總結(jié)

以上是生活随笔為你收集整理的ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。