栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

rosdep init 和 rosdep update 失败问题解决总结

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

rosdep init 和 rosdep update 失败问题解决总结

正常安装ros流程
# -------------- ros 安装 melodic  -----------------------
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential ros-melodic-ros 
sudo apt-get install ros-melodic-rqt*
sudo rosdep init
rosdep update
rosdep init 和 rosdep update 失败问题解决
1.排除网络问题

2.开手机热点

3.增加TIMEOUT的时间:
  更改 /usr/lib/python2.7/dist-packages/rosdep2/下的三个文件sources_list.py、gbpdistro_support.py、rep3.py
中的DOWNLOAD_TIMEOUT = 15.0值,改大一点就可以了,1500左右。
以上三个文件也可能在/usr/lib/python3.6/dist-packages/目录下,用 locate rosdep 确定具体位置;

4.修改hosts文件
通过设置hosts,原来rosdep访问失败的地址可以被预先指定为访问状况良好的IP
到https://www.ipaddress.com/查询http://raw.githubusercontent.com的IP地址,任选一个,例如185.199.108.133

sudo gedit /etc/hosts
//空白处增加一行 
185.199.108.133 raw.githubusercontent.com //中间有空格或者tab分隔


5. 采用修改源,如rosdepc
参考:https://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Q
sudo apt-get install python-pip 
sudo pip install rosdepc
sudo rosdepc init
rosdepc update

//出现以下报错是正常现象,fuerte已经多年没有更新,其中的包也是几乎用不到的
ERROR: Not all sources were able to be updated.
ERROR: unable to process source [https://gitee.com/ohhuo/rosdistro/raw/master/releases/fuerte.yaml]:
	Failed to download target platform data for gbpdistro:
	

如果开手机热点解决不了,建议直接采用方法5.

参考:

解决rosdep update失败问题 - 知乎

本文之后,世上再无rosdep更新失败问题!如果有....小鱼就...

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/350664.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号