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"
colcon build --symlink-install

如果编译报错,EasyInstallDeprecationWarning,可以参考colcon build --symlink-install ,编译失败解决方法

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

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

相关文章

身份和访问管理解决方案:混合型IAM

对于依赖于本地 IT 基础结构和传统安全模型的组织,可以更轻松地验证和授权企业网络内的所有内容,包括设备、用户、应用程序和服务器。尝试从公司网络外部获取访问权限的用户使用虚拟专用网络 (VPN) 和网络访问控制 (NA…

【Spring Boot系列】- Spring Boot侦听器Listener

【Spring Boot系列】- Spring Boot侦听器Listener 文章目录 【Spring Boot系列】- Spring Boot侦听器Listener一、概述二、监听器Listener分类2.1 监听ServletContext的事件监听器2.2 监听HttpSeesion的事件监听器2.3 监听ServletRequest的事件监听器 三、SpringMVC中的监听器3…

匿名管道-

因为父子进程是共享文件描述符的环形队列&#xff0c;只能读一次 会被后面覆盖 /*#include <unistd.h>int pipe(int pipefd[2]);功能&#xff1a;创建一个匿名管道&#xff0c;用于进程间通信参数&#xff1a;int 类型数组 &#xff0c;是传出参数pipefd[0]是管道读端 p…

Git多人开发解决冲突案例

准备工作&#xff1a; 1.创建一个gitee远程仓库https://gitee.com/xxxxxxx.git 2.初始化两个本地git仓库用户&#xff0c;目的是模拟多人协作开发时提交代码发生冲突的场景 3.解决冲突并提交。 进入正题&#xff1a; lisi 通过vim指令修改readme.md文件内容&#xff0c;推送到…

Centos8系统中安装docker-compose报错(已解决)

1.报错内容&#xff1a; ModuleNotFoundError: No module named setuptools_rust Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-jrzp2ukw/bcrypt/2.报错原因&#xff1a; 在CentOS8中安装“加密”程序包时出现问题。当包所需的…

Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小

JDK-1.8zookeeper-3.4.14rocketmq-3.2.6 zookeeper 进入到zookeeper的conf目录 清空配置文件&#xff0c;只保留下面这一行。zookeeper关闭日志输出相对简单。 log4j.rootLoggerOFFrocketmq 进入到rocketmq的conf目录 logback_broker.xml <?xml version"1.0&q…

SpringMVC中的JSR303与拦截器的使用

一&#xff0c;JSR303的概念 JSR303是Java中的一个标准&#xff0c;用于验证和校验JavaBean对象的属性的合法性。它提供了一组用于定义验证规则的注解&#xff0c;如NotNull、Min、Max等。在Spring MVC中&#xff0c;可以使用JSR303注解对请求参数进行校验。 1.2 为什么要使用J…

深度学习-卷积神经网络-纹理表示卷积神经网络-卷积神经网络-[北邮鲁鹏]

这里写目录标题 参考文章全连接神经网络全连接神经网络的瓶颈全连接神经网络应用场景 卷积神经网络卷积层(CONV)卷积核卷积操作卷积层设计卷积步长(stride)边界填充特征响应图组尺寸计算 激活层池化层(POOL)池化操作定义池化操作作用池化层超参数常见池化操作 全连接层(FC)样本…

【看好了】如何使用fiddler实现手机抓包,Filters过滤器!

一、Fiddler与其他抓包工具的区别  1、Firebug虽然可以抓包&#xff0c;但是对于分析http请求的详细信息&#xff0c;不够强大。模拟http请求的功能也不够&#xff0c;且firebug常常是需要“无刷新修改”&#xff0c;如果刷新了页面&#xff0c;所有的修改都不会保存&#xff…

文安县人社局 举办“情暖灾区 就业护航”直播带岗活动

关于防汛救灾工作重要指示精神&#xff0c;助力受灾企业尽快复工复产、受灾群众尽早实现就业。9月15日&#xff0c;文安县人力资源和社会保障局联合文安县总工会、国家税务总局文安县税务局共同举办文安县助力企业灾后重建“直播带岗”活动。 本次活动以“情暖灾区 就业护航”…

IDEA中DEBUG技巧

Debug 介绍 Debug 设置 如上图标注 1 所示&#xff0c;表示设置 Debug 连接方式&#xff0c;默认是 Socket。Shared memory 是 Windows 特有的一个属性&#xff0c;一般在 Windows 系统下建议使用此设置&#xff0c;相对于 Socket 会快点。 ## Debug 常用快捷键 Win 快捷键M…

分享一个Python 写的监控日志log txt文档 的代码

监控log文件的需求 某些特殊原因&#xff0c;想一直看到.log 的最后一行打印&#xff0c;所以写了一些代码监控log &#xff08;有个奇怪需求&#xff0c;就是log 因为重复启动原因&#xff0c;会一直加&#xff0c;不是同一个log&#xff09; 监控界面 涉及的Python代码&…

Unity SteamVR 开发教程:用摇杆/触摸板控制人物持续移动(2.x 以上版本)

文章目录 &#x1f4d5;教程说明&#x1f4d5;场景搭建&#x1f4d5;创建移动的动作&#x1f4d5;移动脚本⭐移动⭐实时调整 CharacterController 的高度 &#x1f4d5;取消手部和 CharacterController 的碰撞 持续移动是 VR 开发中的一个常用功能。一般是用户推动手柄摇杆&…

CNN(八):Inception V1算法实战与解析

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客 &#x1f356; 原作者&#xff1a;K同学啊|接辅导、项目定制 1 Inception V1 Inception v1论文 1.1 理论知识 GoogLeNet首次出现在2014年ILSVRC比赛中获得冠军。这次的版本通常称其为Inception V1。…

strncpy

strncpy&#xff1a; 函数介绍&#xff1a; 函数原型&#xff1a; char *strncpy(char *dest, const char *src, int n) 返回值&#xff1a;dest字符串起始地址 说明&#xff1a; 1、当src字符串长度小于n时&#xff0c;则拷贝完字符串后&#xff0c;剩余部分将用空字节填…

建站系列(八)--- 本地开发环境搭建(WNMP)

目录 相关系列文章前言一、准备工作二、Nginx安装三、MySQL安装四、PHP安装及Nginx配置五、总结 相关系列文章 建站系列&#xff08;一&#xff09;— 网站基本常识 建站系列&#xff08;二&#xff09;— 域名、IP地址、URL、端口详解 建站系列&#xff08;三&#xff09;— …

【设计模式】二、UML 类图概述

文章目录 常见含义含义依赖关系&#xff08;Dependence&#xff09;泛化关系&#xff08;Generalization&#xff09;实现关系&#xff08;Implementation&#xff09;关联关系&#xff08;Association&#xff09;聚合关系&#xff08;Aggregation&#xff09;组合关系&#x…

【JavaScript保姆级教程】输出函数和初识变量

文章目录 前言一、输出内容1.1 document.write()函数1.2 console.log()函数查看终端输出信息 1.3 alert()函数 二、变量的使用1.1 变量的声明1.3变量的赋值1.4 变量的声明和赋值 三、输入提示框的使用总结 前言 JavaScript是一种强大的脚本语言&#xff0c;广泛应用于网页开发…

文件批量重命名:自定义命名与扩展名更改

你是否曾经需要批量更改文件名称和类型&#xff1f;如果你有大量文件需要重命名和更改类型&#xff0c;那么今天我们将向你介绍一种简单的方法来轻松批量更改文件名称和类型。无论你是需要将一个文件夹中的所有图片改为另一种格式&#xff0c;还是需要将一个文件夹中的所有文档…

【基于多输出方向的同步异步日志系统】

本项目涉及的到所有源码见以下链接&#xff1a; https://gitee.com/ace-zhe/wz_log 一、项目简介 1.日志的概念&#xff08;白话版&#xff09; 日志类似于日记&#xff0c;通常是指对完成某件事情的过程中状态等的记录&#xff0c;而计算机中的日志是指日志数据&#xff0c…