ubuntu 20.04 安装源码编译 ros humble过程

公司要兼容ros1还需要ros2 这个时候不得不使用ubuntu20.04 安装 humble 但实际上在20.04上安装humble是需要在源码编译的。
根据这个帖子 https://blog.csdn.net/m0_62353836/article/details/129730981 重写一份,以应对无法下载的问题
系统配置

#检查是否为UTF-8编码,是则跳过!
locale  #非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  

增加带有apt 的ros2 gpg秘钥

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

这里由于无法通过githubusercontent下载,所以这么改

sudo curl -sSL https://raw.gitmirror.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

将存储库添加到源码

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

安装开发工具和ROS工具
安装通用软件包

sudo apt update && sudo apt install -y \python3-flake8-docstrings \python3-pip \python3-pytest-cov \ros-dev-tools

安装Ubuntu20.04所需软件包

python3 -m pip install -U \flake8-blind-except \flake8-builtins \flake8-class-newline \flake8-comprehensions \flake8-deprecated \flake8-import-order \flake8-quotes \"pytest>=5.3" \pytest-repeat \pytest-rerunfailures

获取ros2源码

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

这里还是无法下载需要手动下载https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos这个文件,我们可以通过在镜像网站上下载此文件然后把github.com 改成bgithub.xyz。即可首先我们下载这个文件

wget https://raw.gitmirror.com/ros2/ros2/humble/ros2.repos

其内容为

repositories:ament/ament_cmake:type: giturl: https://github.com/ament/ament_cmake.gitversion: humbleament/ament_index:type: giturl: https://github.com/ament/ament_index.gitversion: humbleament/ament_lint:type: giturl: https://github.com/ament/ament_lint.gitversion: humbleament/ament_package:type: giturl: https://github.com/ament/ament_package.gitversion: humbleament/google_benchmark_vendor:type: giturl: https://github.com/ament/google_benchmark_vendor.gitversion: humbleament/googletest:type: giturl: https://github.com/ament/googletest.gitversion: humbleament/uncrustify_vendor:type: giturl: https://github.com/ament/uncrustify_vendor.gitversion: humbleeProsima/Fast-CDR:type: giturl: https://github.com/eProsima/Fast-CDR.gitversion: v1.0.24eProsima/Fast-DDS:type: giturl: https://github.com/eProsima/Fast-DDS.gitversion: 2.6.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.0ignition/ignition_cmake2_vendor:type: giturl: https://github.com/ignition-release/ignition_cmake2_vendor.gitversion: humbleignition/ignition_math6_vendor:type: giturl: https://github.com/ignition-release/ignition_math6_vendor.gitversion: humbleosrf/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: humbleros-perception/image_common:type: giturl: https://github.com/ros-perception/image_common.gitversion: humbleros-perception/laser_geometry:type: giturl: https://github.com/ros-perception/laser_geometry.gitversion: humbleros-planning/navigation_msgs:type: giturl: https://github.com/ros-planning/navigation_msgs.gitversion: humbleros-tooling/keyboard_handler:type: giturl: https://github.com/ros-tooling/keyboard_handler.gitversion: humbleros-tooling/libstatistics_collector:type: giturl: https://github.com/ros-tooling/libstatistics_collector.gitversion: humbleros-visualization/interactive_markers

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

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

相关文章

CVPR‘25 SOTA——GoalFlow论文精读

1)第一遍___粗读 Q: 这篇论文试图解决什么问题? A: 这篇论文提出了一个名为 GoalFlow 的端到端自动驾驶方法,旨在解决自动驾驶场景中高质量多模态轨迹生成的问题。具体而言,它试图解决以下问题: 轨迹选择的复杂性&am…

关于 CSDN的C知道功能模块 的详细解析,包括 新增的AI搜索(可选深度思考) 和 智能体功能 的具体说明及对比分析

以下是关于 CSDN的C知道功能模块 的详细解析,包括 新增的AI搜索(可选深度思考) 和 智能体功能 的具体说明及对比分析: 一、C知道核心功能模块详解(基础功能) (参考前文内容,此处略…

forms实现快读阅读器

forms实现快读阅读器 主要功能包括: ​​1.文本自动分块显示​​:按设定的速度逐词显示文本内容。 ​​2.阅读控制​​:开始/停止按钮以及回车键控制。 ​​3.界面自定义​​:包括字体、颜色(前景色和背景色&#xff…

PowerBI 条形图显示数值和百分比

数据表: 三个度量值 销售额 VAR Sales SUM(销量表[销售量]) RETURNIF(ISBLANK(sales), 0, sales) //希望Y轴显示所有产品(没有记录显示0)就加这个代码,不希望显示就不加//注意, 因为Y轴显示的产品,会被筛选,所以用ALLSELECTED来获取当前筛…

python: audioFlux XXCC 提取梅尔频率倒谱系数 MFCC

承上一篇:python:audioFlux 使用教程 XXCC: 倒谱系数,支持所有频谱类型. 可以提取梅尔频率倒谱系数(MFCC) Cepstrum coefficients, supports all spectrum types. 以下是使用 audioflux 库中 XXCC 类计算倒谱系数…

为 docker 拉取镜像配置代理

为 Docker 配置代理,有 两个层面 的操作:(1) Docker 守护进程(用于拉取镜像等操作),(2) Docker 容器内部(容器内应用的网络流量)。 我们这篇文章着重于前者,以下是详细步骤&#xff…

最新的es版本忘记密码,重置密码

刚刚安装了最新的es版本,就忘了密码,怎么重置密码呢? 一、进入es的斌目录 #进入es文件/bin 目录 ./elasticsearch-reset-password -u elastic 二 、输入对应的密码 然后再次访问 我的是去掉了ssl的访问 三、如果报错:解决 [main] WARN

cursor如何集成MCP服务

本文主要介绍 Cursor IDE 是如何通过 Model Context Protocol (MCP) 服务来增强其功能的。本文将重点介绍两个核心 MCP 服务的集成:GitHub MCP 服务和 Filesystem MCP 服务。 MCP 服务简介 MCP(Model Context Protocol)是一个允许 IDE 与各…

Linux LED驱动(gpio子系统)

0. gpio子系统 gpio子系统是linux内核当中用于管理GPIO资源的一套系统,它提供了很多GPIO相关的API接口,驱动程序中使用GPIO之前需要向gpio子系统申请。 gpio子系统的主要目的就是方便驱动开发者使用gpio,驱动开发者在设备树中添加gpio相关信息…

go中new和make有什么异同?

相同点:都是给变量分配内存 不同点: 作用类型不同。new通常给int、string、数组类型的变量分配内存,而make通常给slice、map、channel分配内存。返回值类型不同。new返回指向变量的指针,make返回的是变量本身new分配内存空间后&…

C/C++基础知识点

随着工作中琐事越来越多,静下来好好敲代码的时间越来越少,基础知识虽然简单,但常看常新,并记录下来共勉。 一、基础知识点 1. 内存区域中数据管理 在C和C中,内存分为多个区域,每个区域负责存储不同类型的…

消息中间件kafka,rabbitMQ

在分布式系统中,消息中间件是实现不同组件之间异步通信的关键技术。Kafka 和 RabbitMQ 是两个非常流行的消息中间件系统,它们各自有着不同的特点和应用场景。下面将分别介绍 Kafka 和 RabbitMQ,并讨论它们在消息队列中的使用。 一、Kafka (Apache Kafka) 主要特点: 高吞吐…

2k1000LA , 调试串口改成通信串口, uart.

客户的问题解决了,但是 调试串口 改成通信串口的问题,并没有解决,我走的其他的路径。 先准备一些资料。 以备以后使用。 网上的资料。 总结: 实际上 有几种思路了。 1 就是更改 设备树的 chosen 节点, 瑞芯微又单独…

springboot集成spring-cloud-context手动刷新并读取更新后的配置文件

背景 springboot单体项目在运行过程需要刷新springboot配置文件值,比如某个接口限流阈值,新增某个账户等场景。分布式设计的可以直接引入一些持久化中间件比如redis等,也可以用相关配置中心中间件如nacos等。处于成本等场景单体项目可以考虑①…

proteus8.17 环境配置

Proteus介绍 Proteus 8.17 是一款功能强大的电子设计自动化(EDA)软件,广泛应用于电子电路设计、仿真和分析。以下是其主要特点和新功能: ### 主要功能 - **电路仿真**:支持数字和模拟电路的仿真,包括静态…

手机端可部署的开源大模型; 通义千问2.5训练和推理需要的内存和外存

手机端可部署的开源大模型 目录 手机端可部署的开源大模型Qwen2.5 0.5B 7b 推理采用手机内存需要多少Qwen2.5 0.5B不同量化精度下的内存需求Qwen2.5 7B不同量化精度下的内存需求通义千问2.5训练和推理需要的内存和外存推理阶段1. Qwen2.5 - 7B2. Qwen2.5 - 14B3. Qwen2.5 - 72B…

【uniapp-兼容性处理】swiper在iOS上偶发出现后几张图片白屏情况

【日期】2025-04-14 【问题】 swiper在iOS上偶发出现后几张图片白屏情况 swiper内部的几个swiper-item垂直排列,各自进行滚动,样式方面兼容性出现问题 【原因】: 原代码:(不应在swiper-item添加style属性&#xf…

SpringBoot连接MQTT客户端

引入依赖 <dependency><groupId>org.eclipse.paho</groupId><artifactId>org.eclipse.paho.client.mqttv3</artifactId><version>1.2.2</version> </dependency> 启动类 SpringBootApplication public class AxiosDemoApplic…

HTML:网页的骨架 — 入门详解教程

HTML&#xff1a;网页的骨架 — 入门详解教程 HTML&#xff08;HyperText Markup Language&#xff0c;超文本标记语言&#xff09;是构建网页的基础语言&#xff0c;负责定义网页的结构和内容。无论是简单的个人博客&#xff0c;还是复杂的企业网站&#xff0c;HTML都是不可或…

212、【图论】字符串接龙(Python)

题目描述 题目链接&#xff1a;110. 字符串接龙 代码实现 import collectionsn int(input()) beginStr, endStr input().split() strList [input() for _ in range(n)]deque collections.deque() # 使用队列遍历结点 deque.append([beginStr, 1]) # 存储当前字符串和遍…