ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法
ROS1 noetic 版本在ubuntu20.04安装出现问题,rosdep update无法下载,网络地址访问超时。
ROS1 noetic 版本在ubuntu20.04系统上的安装方法见博客:Ubuntu Server 20.04 based on Raspberry- Pi-4B 安装 ROS1 Noetic_Wogg的博客-CSDN博客
一、rosdep init问题
1. sudo rosdep init 出现安全问题
sudo rosdep init命令时出现访问安全性问题,通过将
sudo vim /etc/apt/sources.list.d/ros-latest.list
在ros-latest.list文件中进行修改
deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ focal main改为:deb [trusted=yes] http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ focal main
可以顺利通过sudo rosdep init命令。
2. sudo rosdep init 出现网络问题
出现一下问题:
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
方法二: 直接创建文件
sudo rosdep init 作用就是在cd /etc/ros/rosdep/sources.list.d下创建下载列表20-default.list,网站挂掉,直接在相关文件夹下创建即可,无需再执行命令
cd /etc/ros/rosdep/sources.list.d
touch 20-default.list
20-default.list文件内容如下:
# 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问题
rosdep update 核心问题就是raw.githubusercontent.com无法访问,导致相关文件无法下载。
使用IP138 查询raw.githubusercontent.com,发现该域名已经被禁止。
按照网上的方法,通过在/etc/hosts中添加域名解析的ip:【151.101.84:133 raw.githubusercontent.com】也无法解决,更换过多个ip也无济于事。
将需要的文件下载到本地,然后指定文件的位置,即可解决该问题。
1. 从github上下载所需要的rosdistro
git clone https://github.com/ros/rosdistro.git
git下载较慢,可从这里下载:
rosdistro-master.zip-互联网文档类资源-CSDN下载
将下载好的包移动到指定位置,例如:
sudo cp -r rosdistro /etc/ros
*** 也可不用移动,在下边的步骤中将 20-default.list中的文件路径指定到此包的相应文件即可。
2. 更改sources.list.d
sudo vim /etc/ros/rosdep/sources.list.d/20-default.list
在20-default.list文件更改下载项所在的位置。
# 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
但是,此时,还有部分文件仍然无法下载。
$ 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)>
此时需要修改index-v4.yaml所在的位置
3. 更改python中的ros相关下载项
ros noetic版本基于python3,所以在/usr/lib/python3路径下修改,其他ros版本若基于python2的,需要找到对应的python2 路径进行修改。
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. 进行更新
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一定能通过简单方法rosdep update_努力是明天快乐的源泉-CSDN博客
解决ROS系统 rosdep update超时问题的新方法_leida_wt的博客-CSDN博客_rosdep update 超时
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 的解决_快乐男生总冠军的博客-CSDN博客_rosdep update
Ubuntu 18.04.05 LTS配置ROS Melodic各种问题详细解决(填坑)_晓晨的博客-CSDN博客
ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法相关推荐
- ROS学习笔记十二:使用roswtf
ROS学习笔记十二:使用roswtf 在使用ROS过程中,roswtf工具可以为我们提供ROS系统是否正常工作的检查作用. 注意:在进行下列操作之前,请确保roscore没有运行. 检查ROS是否安装 ...
- ROS学习笔记十二:使用gazebo在ROS中仿真
想要在ROS系统中对我们的机器人进行仿真,需要使用gazebo. gazebo是一种适用于复杂室内多机器人和室外环境的仿真环境.它能够在三维环境中对多个机器人.传感器及物体进行仿真,产生实际传感器反馈 ...
- ROS学习笔记(十)——ROS试用练习(一)
ROS学习笔记(十)--ROS试用练习 在此说明:之前使用的ROS是indigo,前两天电脑"炸"了,所以换了kinetic. 一.ROS文件系统导览 1.1如果你想找到turtl ...
- ROS学习笔记(二)——python、C++编译器以及ROS的安装
ROS学习笔记(二)--python.C++编译器以及ROS的安装 文章目录 ROS学习笔记(二)--python.C++编译器以及ROS的安装 一.编译器的安装 二.ROS的安装 三.验证: 本文主 ...
- ROS 学习笔记(二):自定义消息msg+Publisher+Subscriber 示例运行
ROS 学习笔记(二):自定义消息msg+Publisher+Subscriber 示例运行 一.自定义消息: 1.新建msg文件夹,创建定义Person.msg 文件 mkdir -p ~/catk ...
- ROS学习笔记十:用C++编写一个简单的服务和客户端
ROS学习笔记十:用C++编写一个简单的服务和客户端 这一节主要介绍如何使用C++编写一个简单的服务和客户端节点. 编写服务节点 由于在前面的练习中,已经向beginner_tutorials软件包中 ...
- 吴恩达《机器学习》学习笔记十二——机器学习系统
吴恩达<机器学习>学习笔记十二--机器学习系统 一.设计机器学习系统的思想 1.快速实现+绘制学习曲线--寻找重点优化的方向 2.误差分析 3.数值估计 二.偏斜类问题(类别不均衡) 三. ...
- ROS学习笔记十一:ROS中数据的记录与重放
ROS学习笔记十一:ROS中数据的记录与重放 本节主要介绍如何记录一个正在运行的ROS系统中的数据,然后在一个运行的系统中根据记录文件重新产生和记录时类似的运动情况.本例子还是以小海龟例程为例. 记录 ...
- Python语言入门这一篇就够了-学习笔记(十二万字)
Python语言入门这一篇就够了-学习笔记(十二万字) 友情提示:先关注收藏,再查看,12万字保姆级 Python语言从入门到精通教程. 文章目录 Python语言入门这一篇就够了-学习笔记(十二万字 ...
- Polyworks脚本开发学习笔记(十二)-输出和读取文本文件
Polyworks脚本开发学习笔记(十二)-输出和读取文本文件 Polyworks作为一个测量工具,将测量的数据方便的导出到文本文件则是一项必须的功能.在DATA_FILE这个命令下提供了很多子命令用 ...
最新文章
- MySQL 中的共享表空间与独立表空间如何选择
- 【C语言】CLion中文乱码问题的解决方案
- 【POJ 1151】Atlantis
- 苹果macOS Mojave发布,四年来最大更新
- linux下休眠/待机命令
- MOQL--操作数(Operand) (一)
- Tensorflow:tensor数据类型转换、计算和变换
- Google Calendar Sync_ 把 Microsoft Outlook 同步到 G...
- 湖南计算机保密防范系统,保密技术防护专用系统
- matlab中imcrop函数的具体使用
- ssm框架bean_Bean简介:简化的WordPress框架
- 一款免费开源的远程控制软件UltraVNC安装和使用方法
- [CF850E]Random Elections
- 服务器 exe文件,服务器无故生成exe文件,套路有点深
- Vue新手学习笔记:vue-cli框架
- react使用mock
- 2020-12-02 微信JSAPIV3支付
- C语言期末考试测试题及答案
- 安卓平板装MySQL_准备购入一部平板作为学习用具,有推荐的吗?
- 科达视频系统设置服务器,科达电力系统视频监控解决方案
热门文章
- c fread 快读 详解_万事开头难,手把手教你搭建Appium自动化测试环境,实践案例详解...
- 派大星如期反馈小程序的生命周期
- 桌上有一空盘,最多允许存放一个水果。爸爸可向盘中放一个苹果或放一个桔子,儿子专等吃盘中的桔子,女儿专等吃苹果。	试用P、V操作实现爸爸、儿子、女儿三个并发进程的同步。
- 360极速浏览器X——这款全新的浏览器有亿点点好用
- android 输入法 确定按钮,Android 输入法笔记
- rabbitmq的安装和配置
- 逻辑智力推理题日刷 | Day2
- 损失函数,mse,cee
- 【Python Intelhex- HEX文件修改器工具】
- [PLC]ST语言一:LD_LDI_AND_ANI_OR_ORI