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

2023-05-16

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/hosts

151.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博客

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

  • 树莓派3B+ VNC连接,cannot currently show the desktop 问题解决

    该问题是分辨率问题 xff0c 修改分辨率就可以 以下是修改过程 备份 span class token function cp span boot config txt config txt 打开文件 span class token f
  • 金蝶K/3 跟踪语句_业务单据

    跟踪语句 业务单据 BOM select from t TableDescription where Ftablename like 39 ICBOM 39 select from t FieldDescription where FTab
  • PX4的填坑经历

    2017年3月中旬正式决定入坑PX4 xff0c 以下是期间的经历 xff08 填坑中 xff09 1 2017年4月1日 按PX4 Development Guide xff0c 在ubuntu上建立PIXHAWK的PX4固件开发环境 x
  • Git 分支管理 和 查看提交历史 标签

    git branch 创建分支 gut branch d 删除分支 git checkout 切换分支命令 git merge 合并分支 用 git add 要告诉 Git 文件冲突已经解决 git log 查看历史 git log onl
  • Android 7.0 Launcher3 去掉应用抽屉

    年初做过一个项目 xff0c 有一个需求就是需要将桌面变为单层不需要二级菜单 最近几次有小伙伴有这个问我这个解决办法 现在我将分享给大家 先上效果图 xff1a 功能分解 去除Allapp键 xff0c 调整HotSeat布局将所有应用摆在
  • C++算法库网站 https://zh.cppreference.com/w/cpp/algorithm

    貌似要出国才能访问的C 43 43 标准库api网站 https zh cppreference com w cpp algorithm 有详细的函数介绍 如下图
  • 关于cv.cvtColor转换的问题及解决方法

    问题描述篇 xff1a 今天在调试困扰了我很久的一个问题 xff0c 在训练网络生成batch数据的时候读入原始图像 xff0c 输出的时候却老是出问题 我们都知道YUV和RGB之间的转换关系 xff1a R 61 Y 43 1 4075
  • Nuttx 驱动开发手册

    目录 Nuttx 代码获取编译 Nuttx 启动流程 Nuttx BootLoader 开发之源码分析 gpio 驱动分析 I2c驱动分析 PX4 框架分析 UORB 进程间通讯分析 PX4应用层驱动分析并实现例程 串口驱动GPS 驱动分析
  • 解析小觅中通过双目相机生成深度图的代码

    最近在使用双目摄像机生成深度图 xff0c 研读一下自带的代码 xff0c 做一个记录 第一部分 xff1a 第一部分是定义了一个命名空间 xff0c 其中包含许多个类 第一个类 xff1a 1 代码 GrabCallbacks类主要用于抓
  • altium designer PCB各层介绍+添加多层+设置正/负片+设置层的网络标号

    top layer 顶层 xff0c 用来走线 bottom layer 底层 xff0c 用来走线 mechanical 机械层 xff0c 用来定义PCB形状和尺寸 keepout layer 禁止布线层 xff0c 用来绘制禁布区 t
  • java死锁产生的条件

    以下四个条件同时满足时机会产生死锁 产生死锁的条件互斥 xff0c 共享资源 X 和 Y 只能被一个线程占用 xff1b 占有且等待 xff0c 线程 T1 已经取得共享资源 X xff0c 在等待共享资源 Y 的时候 xff0c 不释放共
  • PID--位置型PID和增量式PID比较

    一 位置型PID 位置型 PID 算法适用于不带积分元件的执行器 执行器的动作位置与其输入信号呈一一对应的关系 控制器根据第 n 次计算机采样结果与给定值之间的偏差 e 来计算出第 n 次采用后所输出的控制变量的值 以调节阀来简单说明 xf
  • 你可能不知道的室内无人机秘密都在这里(二 )

    接上篇 xff1a 你可能不知道的室内无人机秘密都在这里 xff08 一 xff09 如果说上一篇是无人机现状的一些科普知识篇 xff0c 那这篇就直接上干货了 xff0c 希望能真正帮助到喜欢无人机行业 想深入研究无人机的小伙伴们 具体我
  • 漫话程序员们的家庭装修——书房篇

    身为一名程序员 xff0c 辛辛苦苦码代码N年 xff0c 终于攒下钱买了自己的小窝 xff0c 不好好犒劳一下自己都对不起自己的近视眼和鼠标手 这就来分享一下我装修的心得 xff0c 从书房开始 xff01 书房作为程序员在公司战斗一天回
  • Windows下使用vscode 调试linux kernel

    安装WSL2 在microsoft store上安装Ubuntu xff0c 当不能安装时可能需要梯子window中访问Ubuntu的目录使用 xff1a wsl Ubuntu中需要修改软件源 xff1a 参考 https mirrors
  • 计算器算法----C语言实现(堆栈法)

    1 字符串去空格处理 实现一 xff1a span class hljs keyword void span spacess span class hljs keyword char span span class hljs keyword
  • 链接脚本

    本文转自 xff1a http www cnblogs com li hao p 4107964 html 一 概论 每一个链接过程都由 链接脚本 linker script 一般以lds作为文件的后缀名 控制 链接脚本 主要用于规定如何把
  • 记录2017/9/7趋势科技笔试题

    1 下面程序一共会在屏幕上输出多少个 xff1f include lt iostream gt include lt stdio h gt include lt sys types h gt include lt unistd h gt u
  • 字节对齐算法

    ps xff1a 遇见这种算法纯属一个巧合 xff0c 刚入职的我 xff0c 在忙着调用各种SDK中的API xff0c 无暇顾及代码的具体实现 xff0c 有些代码还被屏蔽了 xff0c 在写flash的过程中 xff0c 参考了前辈们
  • UCOSIII学习笔记

    目录 1 学习环境 2 滴答定时器 3 任务 3 1 UCOSIII系统任务 3 2 UCOSIII任务状态 3 3 UCOSIII任务调度 3 4 任务相关的API函数 3 5 钩子函数 4 UCOSIII的中断 5 UCOSIII的临界

随机推荐

  • QCC5125----GAIA

    1 描述 GAIA全称 xff1a Generic Application Interface Architecture xff0c 实现了端到端 xff0c 主机无关的生态系统 xff0c 支持主机应用程序访问设备功能 底层的数据包由8个
  • 【SQLserver】使用openrowset方法导入EXCEL表格数据

    一 前言 在之前的一篇博文中记录了用OPENDATASOURCE函数将EXCEL数据写入SQLserver表中的方法 这一方法需要表名sheet1为固定名称不可更改 实际业务中可能会遇到表名随着日期而改动的情况 xff0c 如果excel表
  • PDM

    PDM Pulse Density Modulation 1 Protocols Introduction1 1 PDM Introduction1 2 PCM Introduction1 3 PDM To PCM 2 PDM Struct
  • FreeRTOS --(1)链表

    Based On FreeRTOS Kernel V10 3 1 1 相关文件 链表结构是 OS 内部经常使用到的 xff0c FreeRTOS 自然也不例外 xff0c 在深入分析各个模块的工作原理之前 xff0c 首先来分析 FreeR
  • FreeRTOS --(3)任务管理之创建任务

    目录 1 描述任务的结构 2 任务创建 2 1 xTaskCreate 2 2 prvInitialiseNewTask 2 3 pxPortInitialiseStack 2 4 prvAddNewTaskToReadyList 在 Fr
  • FreeRTOS --(9)信号量之概述

    目录 1 Binary Semaphores 1 1 Usage 1 2 APIs 1 2 1 xSemaphoreCreateBinary 1 2 2 xSemaphoreTake xSemaphoreTakeFromISR 1 2 3
  • FreeRTOS --(11)资源管理之临界区

    目录 1 taskENTER CRITICAL 2 vTaskSuspendAll 3 Mutexes 3 1 Usage 临界区的概念在任何的 SoC 都存在 xff0c 比如 xff0c 针对一个寄存器 xff0c 基本操作为 xff1
  • MIPI 打怪升级之DCS篇

    目录 1 Overview2 Display Architectures2 1 The Type 1 Display Architecture 3 Power Level3 1 Type 1 Display Architecture Pow
  • MIPI 打怪升级之DPI篇

    目录 1 Overview2 Display Architectures2 1 Type 1 Display Architecture Block Diagram2 2 Type 2 Display Architecture Block D
  • MIPI 打怪升级之DBI篇

    目录 1 Overview2 Display Architectures2 1 Type 1 Display Architecture Block Diagram2 2 Type 2 Display Architecture Block D
  • 还不会华为交换机如何恢复出厂设置的,看这里

    哎呀 xff01 看错了 xff0c 我把三层交换机的配置写到二层交换机了 xff0c 其他的配置可都是好好的 xff0c 不会又要让我重新来一遍吧 xff01 小曼自从上次败北之后就开始研究起网络通信了 xff0c 没想到做个仿真实验还得
  • 基于stm32与NRF24L01的无线门禁系统

    首先 xff0c 需要说明梁只是一个小本科生 xff0c 水平不高 xff0c 许多错误请大家指教 xff08 qq1257681989 xff09 所写的内容是我自己做的 xff0c 写此博客仅在于让自己在完成之后有个回顾和总结 进入正文
  • 2016TI杯——寻迹小车

    首先 xff0c 我选择的是B题 自动循迹小车 xff0c 具体如下 xff1a B题 xff1a 自动循迹小车 1 xff0e 任务 设计制作一个自动循迹小车 小车采用一片 TI公司LDC1314或LDC1000电感数字转换器作为循迹传感
  • C语言小函数——删除字符串str1中含有的字符串str2

    本函数实现的是删除str1中的含有的所有str2 char span class hljs variable delstr span char span class hljs variable src span const char spa
  • 设备树简介

    设备树简介 一 xff1a 设备树由来 linux内核源码中 xff0c 之前充斥着大量的平台相关 xff08 platform Device xff09 配置 xff0c 而这些代码大多是杂乱且重复的 xff0c 这使得ARM体系结构的代
  • NVIDIA TX2上手体验

    NVIDIA TX2上手体验 硬件基础刷机流程远程登陆CAN总线调试回环模式硬件测试 硬件基础 新入手Nvidia TX2开发套件 xff0c 准备安装ubuntu16 04 xff0c 对应jetpack3 3版本 刷机流程 首先你要有一
  • 解决Pixhawk启动解锁过程中出现一些问题

    硬件 xff1a pixhawk2 4 6 固件 xff1a PX4 1 6 4 平台 xff1a linux qgroundcontrol 问题 xff1a 解锁过程中提示 Flying with usb is not safe xff0
  • 使用无线数传 radio telemetry 连接pixhawk进入offboard模式进行mavlink协议通讯的尝试

    环境 xff1a Windows电脑一台 Linux电脑一台 Radio telemetry 收发两端 Pixhawk 2 4 6飞控 USB micro 连接线 软件 xff1a PX4固件 QGroundcontrol 地面站 mavl
  • ROS学习笔记(四)ros 无法rosdep init 或者update解决方法

    如果提示的是 ERROR unable to process source https raw githubusercontent com ros rosdistro master rosdep xxxxx 之类的错误 xff0c 同时保证
  • ROS学习笔记(十二)ROS noetic ubuntu20.04 版本 rosdep init,rosdep update 问题解决方法

    ROS1 noetic 版本在ubuntu20 04安装出现问题 xff0c rosdep update无法下载 xff0c 网络地址访问超时 ROS1 noetic 版本在ubuntu20 04系统上的安装方法见博客 xff1a Ubun