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.pswp.cn/web/75808.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/75808.shtml
英文地址,請注明出處:http://en.pswp.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]) # 存儲當前字符串和遍…