ROS2-IRON Ubuntu-22.0 源码下载失败解决方法 vcs import --input

ROS2

  • 一.ROS2 IRON环境搭建
        • 1.设置系统字符集为UTF-8
        • 2.将RO2 apt 库添加到系统中
        • 3.添加ROS2 GPG key
        • 4.添加ROS 2 的软件源
        • 安装开发工具
  • 二.下载ROS2sh源代码
        • 编译

一.ROS2 IRON环境搭建

虚拟机系统:Ubuntu22.04
虚拟机:VMware-player-full-16.2.5-20904516 (这个是非商用就可以免费使用的哦)
电脑系统:WIN10
以下操作都是在虚拟机下的Ubuntu22.04环境中。
详细步骤参考ROS2官网:

1.设置系统字符集为UTF-8

locale  # check for UTF-8sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8locale  # verify settings

2.将RO2 apt 库添加到系统中

sudo apt install software-properties-common
sudo add-apt-repository universe

3.添加ROS2 GPG key

sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

4.添加ROS 2 的软件源

这个命令的作用是将 ROS 2 的软件源添加到/etc/apt/sources.list.d/ros2.list 文件中。这样系统就可以从这个源中获取 ROS 2 相关的软件包。

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

安装开发工具

sudo apt update && sudo apt install -y \python3-flake8-docstrings \python3-pip \python3-pytest-cov \python3-flake8-blind-except \python3-flake8-builtins \python3-flake8-class-newline \python3-flake8-comprehensions \python3-flake8-deprecated \python3-flake8-import-order \python3-flake8-quotes \python3-pytest-repeat \python3-pytest-rerunfailures \ros-dev-tools

二.下载ROS2sh源代码

创建ros2_iron/src目录,并下载相关源码。

mkdir -p ~/ros2_iron/src
cd ~/ros2_iron
vcs import --input https://raw.githubusercontent.com/ros2/ros2/iron/ros2.repos src

这一步我尝试了很多方法,各种换源。但是因为电脑不能翻墙的原因,一直下失败。我的解决方法是在浏览器中访问

https://raw.githubusercontent.com/ros2/ros2/iron/ros2.repos

可以看到以下信息:

repositories:ament/ament_cmake:type: giturl: https://github.com/ament/ament_cmake.gitversion: ironament/ament_index:type: giturl: https://github.com/ament/ament_index.gitversion: ironament/ament_lint:type: giturl: https://github.com/ament/ament_lint.gitversion: ironament/ament_package:type: giturl: https://github.com/ament/ament_package.gitversion: ironament/google_benchmark_vendor:type: giturl: https://github.com/ament/google_benchmark_vendor.gitversion: ironament/googletest:type: giturl: https://github.com/ament/googletest.gitversion: ironament/uncrustify_vendor:type: giturl: https://github.com/ament/uncrustify_vendor.gitversion: ironeProsima/Fast-CDR:type: giturl: https://github.com/eProsima/Fast-CDR.gitversion: v1.0.27eProsima/Fast-DDS:type: giturl: https://github.com/eProsima/Fast-DDS.gitversion: 2.10.xeProsima/foonathan_memory_vendor:type: giturl: https://github.com/eProsima/foonathan_memory_vendor.gitversion: mastereclipse-cyclonedds/cyclonedds:type: giturl: https://github.com/eclipse-cyclonedds/cyclonedds.gitversion: releases/0.10.xeclipse-iceoryx/iceoryx:type: giturl: https://github.com/eclipse-iceoryx/iceoryx.gitversion: release_2.0gazebo-release/gz_cmake2_vendor:type: giturl: https://github.com/gazebo-release/gz_cmake2_vendor.gitversion: irongazebo-release/gz_math6_vendor:type: giturl: https://github.com/gazebo-release/gz_math6_vendor.gitversion: ironosrf/osrf_pycommon:type: giturl: https://github.com/osrf/osrf_pycommon.gitversion: masterosrf/osrf_testing_tools_cpp:type: giturl: https://github.com/osrf/osrf_testing_tools_cpp.gitversion: ironros-perception/image_common:type: giturl: https://github.com/ros-perception/image_common.gitversion: ironros-perception/laser_geometry:type: giturl: https://github.com/ros-perception/laser_geometry.gitversion: ironros-planning/navigation_msgs:type: giturl: https://github.com/ros-planning/navigation_msgs.gitversion: ironros-tooling/keyboard_handler:type: giturl: https://github.com/ros-tooling/keyboard_handler.gitversion: ironros-tooling/libstatistics_collector:type: giturl: https://github.com/ros-tooling/libstatistics_collector.gitversion: ironros-visualization/interactive_markers:type: giturl: https://github.com/ros-visualization/interactive_markers.gitversion: ironros-visualization/python_qt_binding:type: giturl: https://github.com/ros-visualization/python_qt_binding.gitversion: ironros-visualization/qt_gui_core:type: giturl: https://github.com/ros-visualization/qt_gui_core.gitversion: ironros-visualization/rqt:type: giturl: https://github.com/ros-visualization/rqt.gitversion: ironros-visualization/rqt_action:type: giturl: https://github.com/ros-visualization/rqt_action.gitversion: ironros-visualization/rqt_bag:type: giturl: https://github.com/ros-visualization/rqt_bag.gitversion: ironros-visualization/rqt_console:type: giturl: https://github.com/ros-visualization/rqt_console.gitversion: ironros-visualization/rqt_graph:type: giturl: https://github.com/ros-visualization/rqt_graph.gitversion: ironros-visualization/rqt_msg:type: giturl: https://github.com/ros-visualization/rqt_msg.gitversion: ironros-visualization/rqt_plot:type: giturl: https://github.com/ros-visualization/rqt_plot.gitversion: ironros-visualization/rqt_publisher:type: giturl: https://github.com/ros-visualization/rqt_publisher.gitversion: ironros-visualization/rqt_py_console:type: giturl: https://github.com/ros-visualization/rqt_py_console.gitversion: ironros-visualization/rqt_reconfigure:type: giturl: https://github.com/ros-visualization/rqt_reconfigure.gitversion: ironros-visualization/rqt_service_caller:type: giturl: https://github.com/ros-visualization/rqt_service_caller.gitversion: ironros-visualization/rqt_shell:type: giturl: https://github.com/ros-visualization/rqt_shell.gitversion: ironros-visualization/rqt_srv:type: giturl: https://github.com/ros-visualization/rqt_srv.gitversion: ironros-visualization/rqt_topic:type: giturl: https://github.com/ros-visualization/rqt_topic.gitversion: ironros-visualization/tango_icons_vendor:type: giturl: https://github.com/ros-visualization/tango_icons_vendor.gitversion: ironros/class_loader:type: giturl: https://github.com/ros/class_loader.gitversion: ironros/kdl_parser:type: giturl: https://github.com/ros/kdl_parser.gitversion: ironros/pluginlib:type: giturl: https://github.com/ros/pluginlib.gitversion: ironros/resource_retriever:type: giturl: https://github.com/ros/resource_retriever.gitversion: ironros/robot_state_publisher:type: giturl: https://github.com/ros/robot_state_publisher.gitversion: ironros/ros_environment:type: giturl: https://github.com/ros/ros_environment.gitversion: ironros/ros_tutorials:type: giturl: https://github.com/ros/ros_tutorials.gitversion: ironros/urdfdom:type: giturl: https://github.com/ros/urdfdom.gitversion: ironros/urdfdom_headers:type: giturl: https://github.com/ros/urdfdom_headers.gitversion: ironros2/ament_cmake_ros:type: giturl: https://github.com/ros2/ament_cmake_ros.gitversion: ironros2/common_interfaces:type: giturl: https://github.com/ros2/common_interfaces.gitversion: ironros2/console_bridge_vendor:type: giturl: https://github.com/ros2/console_bridge_vendor.gitversion: ironros2/demos:type: giturl: https://github.com/ros2/demos.gitversion: ironros2/eigen3_cmake_module:type: giturl: https://github.com/ros2/eigen3_cmake_module.gitversion: ironros2/example_interfaces:type: giturl: https://github.com/ros2/example_interfaces.gitversion: ironros2/examples:type: giturl: https://github.com/ros2/examples.gitversion: ironros2/geometry2:type: giturl: https://github.com/ros2/geometry2.gitversion: ironros2/launch:type: giturl: https://github.com/ros2/launch.gitversion: ironros2/launch_ros:type: giturl: https://github.com/ros2/launch_ros.gitversion: ironros2/libyaml_vendor:type: giturl: https://github.com/ros2/libyaml_vendor.gitversion: ironros2/message_filters:type: giturl: https://github.com/ros2/message_filters.gitversion: ironros2/mimick_vendor:type: giturl: https://github.com/ros2/mimick_vendor.gitversion: ironros2/orocos_kdl_vendor:type: giturl: https://github.com/ros2/orocos_kdl_vendor.gitversion: ironros2/performance_test_fixture:type: giturl: https://github.com/ros2/performance_test_fixture.gitversion: ironros2/pybind11_vendor:type: giturl: https://github.com/ros2/pybind11_vendor.gitversion: ironros2/python_cmake_module:type: giturl: https://github.com/ros2/python_cmake_module.gitversion: ironros2/rcl:type: giturl: https://github.com/ros2/rcl.gitversion: ironros2/rcl_interfaces:type: giturl: https://github.com/ros2/rcl_interfaces.gitversion: ironros2/rcl_logging:type: giturl: https://github.com/ros2/rcl_logging.gitversion: ironros2/rclcpp:type: giturl: https://github.com/ros2/rclcpp.gitversion: ironros2/rclpy:type: giturl: https://github.com/ros2/rclpy.gitversion: ironros2/rcpputils:type: giturl: https://github.com/ros2/rcpputils.gitversion: ironros2/rcutils:type: giturl: https://github.com/ros2/rcutils.gitversion: ironros2/realtime_support:type: giturl: https://github.com/ros2/realtime_support.gitversion: ironros2/rmw:type: giturl: https://github.com/ros2/rmw.gitversion: ironros2/rmw_connextdds:type: giturl: https://github.com/ros2/rmw_connextdds.gitversion: ironros2/rmw_cyclonedds:type: giturl: https://github.com/ros2/rmw_cyclonedds.gitversion: ironros2/rmw_dds_common:type: giturl: https://github.com/ros2/rmw_dds_common.gitversion: ironros2/rmw_fastrtps:type: giturl: https://github.com/ros2/rmw_fastrtps.gitversion: ironros2/rmw_implementation:type: giturl: https://github.com/ros2/rmw_implementation.gitversion: ironros2/ros2_tracing:type: giturl: https://github.com/ros2/ros2_tracing.gitversion: ironros2/ros2cli:type: giturl: https://github.com/ros2/ros2cli.gitversion: ironros2/ros2cli_common_extensions:type: giturl: https://github.com/ros2/ros2cli_common_extensions.gitversion: ironros2/ros_testing:type: giturl: https://github.com/ros2/ros_testing.gitversion: ironros2/rosbag2:type: giturl: https://github.com/ros2/rosbag2.gitversion: ironros2/rosidl:type: giturl: https://github.com/ros2/rosidl.gitversion: ironros2/rosidl_core:type: giturl: https://github.com/ros2/rosidl_core.gitversion: ironros2/rosidl_dds:type: giturl: https://github.com/ros2/rosidl_dds.gitversion: ironros2/rosidl_defaults:type: giturl: https://github.com/ros2/rosidl_defaults.gitversion: ironros2/rosidl_dynamic_typesupport:type: giturl: https://github.com/ros2/rosidl_dynamic_typesupportversion: ironros2/rosidl_dynamic_typesupport_fastrtps:type: giturl: https://github.com/ros2/rosidl_dynamic_typesupport_fastrtpsversion: ironros2/rosidl_python:type: giturl: https://github.com/ros2/rosidl_python.gitversion: ironros2/rosidl_runtime_py:type: giturl: https://github.com/ros2/rosidl_runtime_py.gitversion: ironros2/rosidl_typesupport:type: giturl: https://github.com/ros2/rosidl_typesupport.gitversion: ironros2/rosidl_typesupport_fastrtps:type: giturl: https://github.com/ros2/rosidl_typesupport_fastrtps.gitversion: ironros2/rpyutils:type: giturl: https://github.com/ros2/rpyutils.gitversion: ironros2/rviz:type: giturl: https://github.com/ros2/rviz.gitversion: ironros2/spdlog_vendor:type: giturl: https://github.com/ros2/spdlog_vendor.gitversion: ironros2/sros2:type: giturl: https://github.com/ros2/sros2.gitversion: ironros2/system_tests:type: giturl: https://github.com/ros2/system_tests.gitversion: ironros2/test_interface_files:type: giturl: https://github.com/ros2/test_interface_files.gitversion: ironros2/tinyxml2_vendor:type: giturl: https://github.com/ros2/tinyxml2_vendor.gitversion: ironros2/tinyxml_vendor:type: giturl: https://github.com/ros2/tinyxml_vendor.gitversion: ironros2/tlsf:type: giturl: https://github.com/ros2/tlsf.gitversion: ironros2/unique_identifier_msgs:type: giturl: https://github.com/ros2/unique_identifier_msgs.gitversion: ironros2/urdf:type: giturl: https://github.com/ros2/urdf.gitversion: ironros2/yaml_cpp_vendor:type: giturl: https://github.com/ros2/yaml_cpp_vendor.gitversion: iron

url对应的就是github上所在的源代码。把github上的这些源代码仓库转移到gitee上,这个gitee提供了这一部分的功能。
在ros2_iron路径下,用vim新建ros2.repos文件。

vim ros2.repos 

vim 在normal模式下,输入"+p将https://raw.githubusercontent.com/ros2/ros2/iron/ros2.repos中的内容复制到本地(前提是已经复制到系统内存中了,才能使用这个命令)。用vim查找替换url地址。

:%s/https\/\/github.com\/\(.*\)\//gitee.com:makuswork\//g

这样本地中ros2.repos中的url中的内容全部修改成我自己的gitee仓库中了。我把地址改成了ssh的通信。下载源代码时就不用一直的输入帐号和密码了。保存关闭。

在ros2_iron路径下

vcs import --input ros2.repos src

ros2sourcecodedownload
请添加图片描述

编译

sudo apt upgrade
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/127559.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LeetCode刷题笔记【26】:贪心算法专题-4(柠檬水找零、根据身高重建队列、用最少数量的箭引爆气球)

文章目录 前置知识860.柠檬水找零题目描述解题思路代码 406.根据身高重建队列题目描述解题思路代码 452. 用最少数量的箭引爆气球题目描述踩坑-进行模拟正确思路的贪心 总结 前置知识 参考前文 参考文章: LeetCode刷题笔记【23】:贪心算法专题-1&#x…

OpenCV之形态学操作

形态学操作包含以下操作: 腐蚀 (Erosion)膨胀 (Dilation)开运算 (Opening)闭运算 (Closing)形态梯度 (Morphological Gradient)顶帽 (Top Hat)黑帽(Black Hat) 其中腐蚀和膨胀操作是最基本的操作,其他操作由这两个操作变换而来。 腐蚀 用一个结构元素…

YOLO目标检测——密集人群人头数据集+已标注yolo格式标签下载分享

实际项目应用:城市安防、交通管理、社会研究、商业应用、等多个领域数据集说明:YOLO密集人群人头目标检测数据集,真实场景的高质量图片数据,数据场景丰富,图片格式为jpg,共4300张图片。标注说明&#xff1a…

vue3详解

认识Vue3 1. Vue2 选项式 API vs Vue3 组合式API <script> export default {data(){return {count:0}},methods:{addCount(){this.count}} } </script> <script setup> import { ref } from vue const count ref(0) const addCount ()> count.value …

区块链技术与应用 - 学习笔记2【密码学基础】

大家好&#xff0c;我是比特桃。本系列笔记只专注于探讨研究区块链技术原理&#xff0c;不做其他违反相关规定的讨论。 区块链技术已被纳入国家十四五规划&#xff0c;在“加快数字发展 建设数字中国”篇章中&#xff0c;区块链被列为“十四五”七大数字经济重点产业之一&#…

kafka-- 安装kafka manager及简单使用

一 、安装kafka manager 管控台&#xff1a; # 安装kafka manager 管控台&#xff1a; ## 上传 cd /usr/local/software ## 解压 unzip kafka-manager-2.0.0.2.zip -d /usr/local/ cd /usr/local/kafka-manager-2.0.0.2/conf vim /usr/local/kafka-manager-2.0.0.2/conf/appl…

解决虚拟机克隆后IP和命名冲突问题

目录 解决IP冲突问题 解决命名冲突 解决IP冲突问题 克隆后的虚拟机和硬件地址和ip和我们原虚拟机的相同&#xff0c;我们需要重新生成硬件地址和定义ip&#xff0c;步骤如下&#xff1a; &#xff08;1&#xff09;进入 /etc/sysconfig/network-scripts/ifcfg-ens33 配置文件…

PaddleOCR学习笔记3-通用识别服务

今天优化了下之前的初步识别服务的python代码和html代码。 采用flask paddleocr bootstrap快速搭建OCR识别服务。 代码结构如下&#xff1a; 模板页面代码文件如下&#xff1a; upload.html : <!DOCTYPE html> <html> <meta charset"utf-8"> …

在UE4虚幻引擎中加入导航网格体边界体积后丧尸不能移动和发现玩家

UE4系列文章目录 文章目录 UE4系列文章目录前言一、用到的知识点二、问题原因 前言 最近使用ue4做第一人称视角射击游戏发现问题&#xff0c;加入导航网格体边界体积后丧尸不能移动和发现玩家。下图是出现的问题图片 一、用到的知识点 1.行为树&#xff1a;控制并显示AI的决…

基于Zookeeper搭建Kafka高可用集群(实践可用)

目录 一、Zookeeper集群搭建 1.1 下载 & 解压 1.2 修改配置 1.3 标识节点 1.4 启动集群 1.5 集群验证 二、Kafka集群搭建 2.1 下载解压 2.2 拷贝配置文件 2.3 修改配置 2.4 启动集群 2.5 创建测试主题 2.6 写入数据测试 一、Zookeeper集群搭建 为保证集群高可…

Python实操:内存管理与优化策略

在 Python 开发过程中&#xff0c;合理有效地管理和优化内存使用是提高程序性能和效率的关键。本文将深入探讨 Python 中的内存管理机制&#xff0c;并分享一些实用的优化策略和具体操作步骤&#xff0c;帮助您更好地利用资源、减少内存占用并提升代码执行速度。 一、了解 Pyth…

66.C++多态与虚函数

目录 1.什么是多态 2.多态的分类 3.对象转型 3.1 向上转型&#xff1a; 3.2 向下转型&#xff1a; 4.虚函数 1.什么是多态 生活中的多态&#xff0c;是指的客观的事物在人脑中的主观体现。例如&#xff0c;在路上看到⼀只哈士奇&#xff0c;你可以看做是哈士奇&#xf…

Scrapy的基本介绍、安装及工作流程

一.Scrapy介绍 Scrapy是什么&#xff1f; Scrapy 是用 Python 实现的一个为了爬取网站数据、提取结构性数据而编写的应用框架(异步爬虫框架) 通常我们可以很简单的通过 Scrapy 框架实现一个爬虫&#xff0c;抓取指定网站的内容或图片。 Scrapy使用了Twisted异步网络框架&…

HTML的有序列表、无序列表、自定义列表

目录 背景: 过程: 无序列表: 简介: 代码展示: 效果展示:​ 无序列表: 简介: 效果展示:​ 自定义列表: 简介&#xff1a; 效果展示: 总结&#xff1a; 背景: 1.有序列表&#xff08;Ordered List&#xff09;&#xff1a; 有序列表是最早的列表类型之一&#xff…

Spring Web Flow远程代码执行漏洞复现(CVE-2017-4971)

一、搭建环境 cd vulhub/spring/CVE-2017-4971 docker-compose up -d 影响版本:Spring Web Flow 2.4.0 ~ 2.4.4 触发条件: 1.MvcViewFactoryCreator对象的useSpringBeanBinding参数需要设置为false&#xff08;默认值&#xff09; 2. flow view对象中设置BinderConfiguration…

Yolov5如何训练自定义的数据集,以及使用GPU训练,涵盖报错解决

本文主要讲述了Yolov5如何训练自定义的数据集&#xff0c;以及使用GPU训练&#xff0c;涵盖报错解决&#xff0c;案例是检测图片中是否有救生圈。 最后的效果图大致如下&#xff1a; 效果图1效果图2 前言 系列文章 1、详细讲述Yolov5从下载、配置及如何使用GPU运行 2、…

数据结构大作业 成绩分析c语言程序设计

界面加载 界面展示 成绩输入 求平均成绩 升序排列 降序排列 名字排序 按名字搜索 按ID搜索 每门课成绩分析 成绩单展示 -

Mac 手动安装 sshpass

1. 下载安装包 https://sourceforge.net/projects/sshpass/ 解压并进入到安装包目录 tar -zxvf sshpass-xx.xx.tar.gz cd sshpass-xx.xx2. 检验环境&#xff0c;编译源码安装 ./configuremake&&make install3. 检测安装是否成功 ▶ sshpass Usage: sshpass [-f|-…

2023/9/8 -- C++/QT

作业 1> 自行封装一个栈的类&#xff0c;包含私有成员属性&#xff1a;栈的数组、记录栈顶的变量 成员函数完成&#xff1a;构造函数、析构函数、拷贝构造函数、入栈、出栈、清空栈、判空、判满、获取栈顶元素、求栈的大小 02stack.h: #ifndef __02STACK_H__ #define __…

网络协议从入门到底层原理学习(三)—— 路由

网络协议从入门到底层原理学习&#xff08;三&#xff09;—— 路由 1、简介 路由&#xff08;routing&#xff09;是指分组从源到目的地时&#xff0c;决定端到端路径的网络范围的进程 在不同网段之间转发数据&#xff0c;需要有路由器的支持 默认情况下&#xff0c;路由器…