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

news2024/12/23 20:23:20

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-8

sudo 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-8

locale  # 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: git
   url: https://github.com/ament/ament_cmake.git
   version: iron
 ament/ament_index:
   type: git
   url: https://github.com/ament/ament_index.git
   version: iron
 ament/ament_lint:
   type: git
   url: https://github.com/ament/ament_lint.git
   version: iron
 ament/ament_package:
   type: git
   url: https://github.com/ament/ament_package.git
   version: iron
 ament/google_benchmark_vendor:
   type: git
   url: https://github.com/ament/google_benchmark_vendor.git
   version: iron
 ament/googletest:
   type: git
   url: https://github.com/ament/googletest.git
   version: iron
 ament/uncrustify_vendor:
   type: git
   url: https://github.com/ament/uncrustify_vendor.git
   version: iron
 eProsima/Fast-CDR:
   type: git
   url: https://github.com/eProsima/Fast-CDR.git
   version: v1.0.27
 eProsima/Fast-DDS:
   type: git
   url: https://github.com/eProsima/Fast-DDS.git
   version: 2.10.x
 eProsima/foonathan_memory_vendor:
   type: git
   url: https://github.com/eProsima/foonathan_memory_vendor.git
   version: master
 eclipse-cyclonedds/cyclonedds:
   type: git
   url: https://github.com/eclipse-cyclonedds/cyclonedds.git
   version: releases/0.10.x
 eclipse-iceoryx/iceoryx:
   type: git
   url: https://github.com/eclipse-iceoryx/iceoryx.git
   version: release_2.0
 gazebo-release/gz_cmake2_vendor:
   type: git
   url: https://github.com/gazebo-release/gz_cmake2_vendor.git
   version: iron
 gazebo-release/gz_math6_vendor:
   type: git
   url: https://github.com/gazebo-release/gz_math6_vendor.git
   version: iron
 osrf/osrf_pycommon:
   type: git
   url: https://github.com/osrf/osrf_pycommon.git
   version: master
 osrf/osrf_testing_tools_cpp:
   type: git
   url: https://github.com/osrf/osrf_testing_tools_cpp.git
   version: iron
 ros-perception/image_common:
   type: git
   url: https://github.com/ros-perception/image_common.git
   version: iron
 ros-perception/laser_geometry:
   type: git
   url: https://github.com/ros-perception/laser_geometry.git
   version: iron
 ros-planning/navigation_msgs:
   type: git
   url: https://github.com/ros-planning/navigation_msgs.git
   version: iron
 ros-tooling/keyboard_handler:
   type: git
   url: https://github.com/ros-tooling/keyboard_handler.git
   version: iron
 ros-tooling/libstatistics_collector:
   type: git
   url: https://github.com/ros-tooling/libstatistics_collector.git
   version: iron
 ros-visualization/interactive_markers:
   type: git
   url: https://github.com/ros-visualization/interactive_markers.git
   version: iron
 ros-visualization/python_qt_binding:
   type: git
   url: https://github.com/ros-visualization/python_qt_binding.git
   version: iron
 ros-visualization/qt_gui_core:
   type: git
   url: https://github.com/ros-visualization/qt_gui_core.git
   version: iron
 ros-visualization/rqt:
   type: git
   url: https://github.com/ros-visualization/rqt.git
   version: iron
 ros-visualization/rqt_action:
   type: git
   url: https://github.com/ros-visualization/rqt_action.git
   version: iron
 ros-visualization/rqt_bag:
   type: git
   url: https://github.com/ros-visualization/rqt_bag.git
   version: iron
 ros-visualization/rqt_console:
   type: git
   url: https://github.com/ros-visualization/rqt_console.git
   version: iron
 ros-visualization/rqt_graph:
   type: git
   url: https://github.com/ros-visualization/rqt_graph.git
   version: iron
 ros-visualization/rqt_msg:
   type: git
   url: https://github.com/ros-visualization/rqt_msg.git
   version: iron
 ros-visualization/rqt_plot:
   type: git
   url: https://github.com/ros-visualization/rqt_plot.git
   version: iron
 ros-visualization/rqt_publisher:
   type: git
   url: https://github.com/ros-visualization/rqt_publisher.git
   version: iron
 ros-visualization/rqt_py_console:
   type: git
   url: https://github.com/ros-visualization/rqt_py_console.git
   version: iron
 ros-visualization/rqt_reconfigure:
   type: git
   url: https://github.com/ros-visualization/rqt_reconfigure.git
   version: iron
 ros-visualization/rqt_service_caller:
   type: git
   url: https://github.com/ros-visualization/rqt_service_caller.git
   version: iron
 ros-visualization/rqt_shell:
   type: git
   url: https://github.com/ros-visualization/rqt_shell.git
   version: iron
 ros-visualization/rqt_srv:
   type: git
   url: https://github.com/ros-visualization/rqt_srv.git
   version: iron
 ros-visualization/rqt_topic:
   type: git
   url: https://github.com/ros-visualization/rqt_topic.git
   version: iron
 ros-visualization/tango_icons_vendor:
   type: git
   url: https://github.com/ros-visualization/tango_icons_vendor.git
   version: iron
 ros/class_loader:
   type: git
   url: https://github.com/ros/class_loader.git
   version: iron
 ros/kdl_parser:
   type: git
   url: https://github.com/ros/kdl_parser.git
   version: iron
 ros/pluginlib:
   type: git
   url: https://github.com/ros/pluginlib.git
   version: iron
 ros/resource_retriever:
   type: git
   url: https://github.com/ros/resource_retriever.git
   version: iron
 ros/robot_state_publisher:
   type: git
   url: https://github.com/ros/robot_state_publisher.git
   version: iron
 ros/ros_environment:
   type: git
   url: https://github.com/ros/ros_environment.git
   version: iron
 ros/ros_tutorials:
   type: git
   url: https://github.com/ros/ros_tutorials.git
   version: iron
 ros/urdfdom:
   type: git
   url: https://github.com/ros/urdfdom.git
   version: iron
 ros/urdfdom_headers:
   type: git
   url: https://github.com/ros/urdfdom_headers.git
   version: iron
 ros2/ament_cmake_ros:
   type: git
   url: https://github.com/ros2/ament_cmake_ros.git
   version: iron
 ros2/common_interfaces:
   type: git
   url: https://github.com/ros2/common_interfaces.git
   version: iron
 ros2/console_bridge_vendor:
   type: git
   url: https://github.com/ros2/console_bridge_vendor.git
   version: iron
 ros2/demos:
   type: git
   url: https://github.com/ros2/demos.git
   version: iron
 ros2/eigen3_cmake_module:
   type: git
   url: https://github.com/ros2/eigen3_cmake_module.git
   version: iron
 ros2/example_interfaces:
   type: git
   url: https://github.com/ros2/example_interfaces.git
   version: iron
 ros2/examples:
   type: git
   url: https://github.com/ros2/examples.git
   version: iron
 ros2/geometry2:
   type: git
   url: https://github.com/ros2/geometry2.git
   version: iron
 ros2/launch:
   type: git
   url: https://github.com/ros2/launch.git
   version: iron
 ros2/launch_ros:
   type: git
   url: https://github.com/ros2/launch_ros.git
   version: iron
 ros2/libyaml_vendor:
   type: git
   url: https://github.com/ros2/libyaml_vendor.git
   version: iron
 ros2/message_filters:
   type: git
   url: https://github.com/ros2/message_filters.git
   version: iron
 ros2/mimick_vendor:
   type: git
   url: https://github.com/ros2/mimick_vendor.git
   version: iron
 ros2/orocos_kdl_vendor:
   type: git
   url: https://github.com/ros2/orocos_kdl_vendor.git
   version: iron
 ros2/performance_test_fixture:
   type: git
   url: https://github.com/ros2/performance_test_fixture.git
   version: iron
 ros2/pybind11_vendor:
   type: git
   url: https://github.com/ros2/pybind11_vendor.git
   version: iron
 ros2/python_cmake_module:
   type: git
   url: https://github.com/ros2/python_cmake_module.git
   version: iron
 ros2/rcl:
   type: git
   url: https://github.com/ros2/rcl.git
   version: iron
 ros2/rcl_interfaces:
   type: git
   url: https://github.com/ros2/rcl_interfaces.git
   version: iron
 ros2/rcl_logging:
   type: git
   url: https://github.com/ros2/rcl_logging.git
   version: iron
 ros2/rclcpp:
   type: git
   url: https://github.com/ros2/rclcpp.git
   version: iron
 ros2/rclpy:
   type: git
   url: https://github.com/ros2/rclpy.git
   version: iron
 ros2/rcpputils:
   type: git
   url: https://github.com/ros2/rcpputils.git
   version: iron
 ros2/rcutils:
   type: git
   url: https://github.com/ros2/rcutils.git
   version: iron
 ros2/realtime_support:
   type: git
   url: https://github.com/ros2/realtime_support.git
   version: iron
 ros2/rmw:
   type: git
   url: https://github.com/ros2/rmw.git
   version: iron
 ros2/rmw_connextdds:
   type: git
   url: https://github.com/ros2/rmw_connextdds.git
   version: iron
 ros2/rmw_cyclonedds:
   type: git
   url: https://github.com/ros2/rmw_cyclonedds.git
   version: iron
 ros2/rmw_dds_common:
   type: git
   url: https://github.com/ros2/rmw_dds_common.git
   version: iron
 ros2/rmw_fastrtps:
   type: git
   url: https://github.com/ros2/rmw_fastrtps.git
   version: iron
 ros2/rmw_implementation:
   type: git
   url: https://github.com/ros2/rmw_implementation.git
   version: iron
 ros2/ros2_tracing:
   type: git
   url: https://github.com/ros2/ros2_tracing.git
   version: iron
 ros2/ros2cli:
   type: git
   url: https://github.com/ros2/ros2cli.git
   version: iron
 ros2/ros2cli_common_extensions:
   type: git
   url: https://github.com/ros2/ros2cli_common_extensions.git
   version: iron
 ros2/ros_testing:
   type: git
   url: https://github.com/ros2/ros_testing.git
   version: iron
 ros2/rosbag2:
   type: git
   url: https://github.com/ros2/rosbag2.git
   version: iron
 ros2/rosidl:
   type: git
   url: https://github.com/ros2/rosidl.git
   version: iron
 ros2/rosidl_core:
   type: git
   url: https://github.com/ros2/rosidl_core.git
   version: iron
 ros2/rosidl_dds:
   type: git
   url: https://github.com/ros2/rosidl_dds.git
   version: iron
 ros2/rosidl_defaults:
   type: git
   url: https://github.com/ros2/rosidl_defaults.git
   version: iron
 ros2/rosidl_dynamic_typesupport:
   type: git
   url: https://github.com/ros2/rosidl_dynamic_typesupport
   version: iron
 ros2/rosidl_dynamic_typesupport_fastrtps:
   type: git
   url: https://github.com/ros2/rosidl_dynamic_typesupport_fastrtps
   version: iron
 ros2/rosidl_python:
   type: git
   url: https://github.com/ros2/rosidl_python.git
   version: iron
 ros2/rosidl_runtime_py:
   type: git
   url: https://github.com/ros2/rosidl_runtime_py.git
   version: iron
 ros2/rosidl_typesupport:
   type: git
   url: https://github.com/ros2/rosidl_typesupport.git
   version: iron
 ros2/rosidl_typesupport_fastrtps:
   type: git
   url: https://github.com/ros2/rosidl_typesupport_fastrtps.git
   version: iron
 ros2/rpyutils:
   type: git
   url: https://github.com/ros2/rpyutils.git
   version: iron
 ros2/rviz:
   type: git
   url: https://github.com/ros2/rviz.git
   version: iron
 ros2/spdlog_vendor:
   type: git
   url: https://github.com/ros2/spdlog_vendor.git
   version: iron
 ros2/sros2:
   type: git
   url: https://github.com/ros2/sros2.git
   version: iron
 ros2/system_tests:
   type: git
   url: https://github.com/ros2/system_tests.git
   version: iron
 ros2/test_interface_files:
   type: git
   url: https://github.com/ros2/test_interface_files.git
   version: iron
 ros2/tinyxml2_vendor:
   type: git
   url: https://github.com/ros2/tinyxml2_vendor.git
   version: iron
 ros2/tinyxml_vendor:
   type: git
   url: https://github.com/ros2/tinyxml_vendor.git
   version: iron
 ros2/tlsf:
   type: git
   url: https://github.com/ros2/tlsf.git
   version: iron
 ros2/unique_identifier_msgs:
   type: git
   url: https://github.com/ros2/unique_identifier_msgs.git
   version: iron
 ros2/urdf:
   type: git
   url: https://github.com/ros2/urdf.git
   version: iron
 ros2/yaml_cpp_vendor:
   type: git
   url: https://github.com/ros2/yaml_cpp_vendor.git
   version: 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.coloradmin.cn/o/995563.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

YOLOv5算法改进(15)— 更换Neck之AFPN

前言:Hello大家好,我是小哥谈。在YOLOv5中添加AFPN(Adaptive Feature Pyramid Network)可以提高目标检测的准确性。AFPN是一种用于目标检测任务的功能增强模块,它能够自适应地融合来自不同层级的特征图,以提…

scss文件自动导入

正常使用scss文件,需要先导入再使用内部变量,自动导入可以免除手动导入的步骤,直接使用内部的变量。 步骤:装包 -> scss文件 -> 配置 1. 装包 npm i sass -D // -D 仅在开发环境中依赖 2. 新增一个 scss文件&#xff…

设计模式之单列模式

单列模式是一种经典的设计模式,在校招中最乐意考的设计模式之一~ 设计模式就是软件开发中的棋谱,大佬们针对一些常见的场景,总结出来的代码的编写套路,按照套路来写,不说你写的多好,至少不会太差~ 在校招中…

Java的环境配置

目录 window系统安装java下载JDK配置环境变量JAVA_HOME 设置PATH设置CLASSPATH 设置测试JDK是否安装成功 Linux,UNIX,Solaris,FreeBSD环境变量设置流行JAVA开发工具使用 Eclipse 运行第一个 Java 程序 window系统安装java 下载JDK 首先我们…

OLED透明屏触控:引领未来科技革命的创新力量

OLED透明屏触控技术作为一项颠覆性的创新,正在引领新一轮科技革命。它将OLED显示技术与触摸技术相结合,实现了透明度和触控功能的完美融合。 在这篇文章中,尼伽将通过引用最新的市场数据、报告和行业动态,详细介绍OLED透明屏触控…

Java知识总结(持续更新)

一、JDK、JRE、JVM三者之间的关系? 1. **JDK (Java Development Kit)**: JDK 是 Java 开发工具包,它包含了用于开发 Java 应用程序的所有必要工具和库。这包括 Java 编译器(javac)、Java 核心类库、开发工具&#x…

【Day-33慢就是快】代码随想录-二叉树-二叉搜索树中的搜索

给定二叉搜索树(BST)的根节点和一个值。 你需要在BST中找到节点值等于给定值的节点。 返回以该节点为根的子树。 如果节点不存在,则返回 NULL。 思路 什么是二叉搜索树: 二叉搜索树是一个有序树: 若它的左子树不空&a…

【NVIDIA CUDA】2023 CUDA夏令营编程模型(三)

博主未授权任何人或组织机构转载博主任何原创文章,感谢各位对原创的支持! 博主链接 本人就职于国际知名终端厂商,负责modem芯片研发。 在5G早期负责终端数据业务层、核心网相关的开发工作,目前牵头6G算力网络技术标准研究。 博客…

yolov7增加mobileone

代码地址:GitHub - apple/ml-mobileone: This repository contains the official implementation of the research paper, "An Improved One millisecond Mobile Backbone". 论文地址:https://arxiv.org/abs/2206.04040 MobileOne出自Apple&am…

IP403参考资料和引脚图

特性 支持串并联双LED驱动和GPIO控制器 串并联LED驱动器 支持一个串行输入56个并行led或三串行输入16个并行ed为每个串行输入。 支持4-16mA可调电流源驱动,无限流电阻 支持LED熄灭模式,实现省电功能 提供级联能力,提供更多的LED驱动输出…

go语言基础---8

Http请求报文格式分析 package mainimport ("fmt""net" )func main() {//监听listener, err : net.Listen("tcp", ":8000")if err ! nil {fmt.Println("listener err", err)return}defer listener.Close()//阻塞等待用户的…

SAM + YOLOv8 图像分割及对象检测

SAM(Segment Anything Model)是由 Meta 的研究人员团队创建和训练的深度学习模型。该创新成果发表在 2023 年 4 月 5 日发表的一篇研究论文中,它立即引起了公众的广泛兴趣——相关的 Twitter 帖子迄今为止已累积超过 350 万次浏览: 计算机视…

接口文档生成工具JAPiDocs

效果如下: 相比Swagger要写一堆注解,Spring RestDocs需要写测试用例,才能生成API文档。 要使得JApiDcos正确工作,代码应该是像下面的样子的: /*** 用户接口*/ RequestMapping("/api/user/") RestControll…

YOLO目标检测——口罩规范佩戴数据集+已标注xml和txt格式标签下载分享

实际项目应用:目标检测口罩佩戴检测数据集的应用场景涵盖了公共场所监控、疫情防控管理、安全管理与控制以及人员统计和分析等领域。这些应用场景可以帮助相关部门和机构更好地管理口罩佩戴情况,提高公共卫生和安全水平,保障人们的健康和安全…

C++数据结构X篇_10_C++栈的应用-中缀转后缀

中缀表达式就是我们平时运算表达式,其特点是运算符总是处于两个运算对象之间。但是该表达式计算机处理起来较为麻烦,会将其转写成后缀表达式,后缀表达式也叫逆波兰表达式,后缀表达式的特点是每个运算符都置于两个运算对象之后。此…

微信小程序AI类目-深度合成-AI问答/AI绘画 互联网信息服务算法备案审核通过教程

近期小程序审核规则变化后,很多使用人类小徐提供的chatGPT系统的会员上传小程序无法通过审核,一直提示需要增加深度合成-AI问答、深度合成-AI绘画类目,该类目需要提供互联网信息服务算法备案并上传资质,一般对企业来说这种务很难实…

SSH是如何配置的

目录 什么是SSH SSH可以做什么其他用途? ssh有几种连接方法吗 我应该用哪种方法连接SSH1或SSH2? 每天都在用SSH你知道SSH的原理吗 开启ssh后telnet会关闭吗 SSH的优缺点 SSH和Telnet之间优缺点的对比 SSH的配置实验 ensp Cisco H3C 1、什么是…

linux内核模块编译方法详解

文章目录 前言一、静态加载法1.1 编写驱动程序1.2 将新功能配置在内核中1.3为新功能代码改写Makefile1.4 make menuconfig界面里将新功能对应的那项选择为<*> 二、动态加载法2.1 新功能源码与Linux内核源码在同一目录结构下2.2 新功能源码与Linux内核源码不在同一目录结构…

0003号因子测试结果、代码和数据

这篇文章共分为四个部分:第一个部分是因子测试结果,第二个部分是因子逻辑,第三个部分是因子代码,第四个部分是整个因子测试用的数据、代码、分析结果的下载地址。 因子测试结果: 因子描述 因子属性-量价因子因子构建:计算成交量的变化率和日振幅率,计算两者在过去一定…

Solidity 小白教程:12. 事件

Solidity 小白教程&#xff1a;12. 事件 这一讲&#xff0c;我们用转账 ERC20 代币为例来介绍solidity中的事件&#xff08;event&#xff09;。 事件 Solidity中的事件&#xff08;event&#xff09;是EVM上日志的抽象&#xff0c;它具有两个特点&#xff1a; 响应&#x…