国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

ubuntu 22.04源碼裝ros1 noetic

這篇具有很好參考價值的文章主要介紹了ubuntu 22.04源碼裝ros1 noetic。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

ubuntu 22.04源碼裝ros1 noetic


參考鏈接

https://gist.github.com/Meltwin/fe2c15a5d7e6a8795911907f627255e0

1. 安裝依賴

sudo apt-get install python3-rosdep python3-rosinstall-generator python3-vcstools python3-vcstool build-essential

2. 更換rosdep相關(guān)的rep鏈接

參考:https://blog.csdn.net/zyh821351004/article/details/135519444?spm=1001.2014.3001.5501

mkdir -p ~/.ros/rosdep
cd ~/.ros/rosdep
~/.ros/rosdep$ git clone git@github.com:ros/rosdistro.git 

cat rosdep/sources.list.d/20-default.list
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/osx-homebrew.yaml osx

# generic
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/base.yaml
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/python.yaml
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/robot/.ros/rosdep/rosdistro/releases/fuerte.yaml fuerte
 
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list

 
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/osx-homebrew.yaml osx

# generic
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/base.yaml
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/python.yaml
yaml file:///home/robot/.ros/rosdep/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/robot/.ros/rosdep/rosdistro/releases/fuerte.yaml fuerte
 
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

sudo gedit /usr/lib/python3/dist-packages/rosdep2/sources_list.py

#DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
DEFAULT_SOURCES_LIST_URL = 'file:///home/robot/.ros/rosdep/rosdistro/rosdep/sources.list.d/20-default.list'

sudo gedit /usr/lib/python3/dist-packages/rosdep2/rep3.py

#REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
REP3_TARGETS_URL = 'file:///home/robot/.ros/rosdep/rosdistro/releases/targets.yaml'

sudo gedit /usr/lib/python3/dist-packages/rosdistro/init.py

#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///home/robot/.ros/rosdep/rosdistro/index-v4.yaml'
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list 
sudo rosdep init
rosdep update

3. 安裝 rosdep

sudo rosdep init
rosdep update

4. 創(chuàng)建工作空間下載源碼并安裝

mkdir ./noetic_ws
cd ./noetic_ws
rosinstall_generator desktop --rosdistro noetic --deps --tar > noetic-desktop.rosinstall
mkdir ./src
vcs import --input noetic-desktop.rosinstall ./src


rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y

等待下載完成
備份打包源碼 csdn_下載:

noetic-desktop.rosinstall  noetic-base.rosinstall
noetic-desktop.rosinstall   737行

類似:
- tar:
    local-name: actionlib/actionlib
    uri: https://github.com/ros-gbp/actionlib-release/archive/release/noetic/actionlib/1.14.0-1.tar.gz
    version: actionlib-release-release-noetic-actionlib-1.14.0-1
- tar:
    local-name: angles
    uri: https://github.com/ros-gbp/geometry_angles_utils-release/archive/release/noetic/angles/1.9.13-1.tar.gz
    version: geometry_angles_utils-release-release-noetic-angles-1.9.13-1
/opt/ros/noetic_ws/src$ ls
actionlib              metapackages           rqt_moveit
angles                 navigation_msgs        rqt_msg
bond_core              nodelet_core           rqt_nav_view
catkin                 pluginlib              rqt_plot
class_loader           python_qt_binding      rqt_pose_view
cmake_modules          qt_gui_core            rqt_publisher
common_msgs            qwt_dependency         rqt_py_console
common_tutorials       resource_retriever     rqt_reconfigure
control_msgs           robot_state_publisher  rqt_robot_dashboard
diagnostics            ros                    rqt_robot_monitor
dynamic_reconfigure    rosbag_migration_rule  rqt_robot_plugins
executive_smach        ros_comm               rqt_robot_steering
filters                ros_comm_msgs          rqt_runtime_monitor
gencpp                 rosconsole             rqt_rviz
geneus                 rosconsole_bridge      rqt_service_caller
genlisp                roscpp_core            rqt_shell
genmsg                 ros_environment        rqt_srv
gennodejs              roslint                rqt_tf_tree
genpy                  roslisp                rqt_top
geometry               rospack                rqt_topic
geometry2              ros_tutorials          rqt_web
geometry_tutorials     rqt                    rviz
gl_dependency          rqt_action             std_msgs
image_common           rqt_bag                urdf
interactive_markers    rqt_common_plugins     urdf_tutorial
joint_state_publisher  rqt_console            vision_opencv
kdl_parser             rqt_dep                visualization_tutorials
laser_geometry         rqt_graph              webkit_dependency
media_export           rqt_image_view         xacro
message_generation     rqt_launch
message_runtime        rqt_logger_level

5. 編譯代碼

./src/catkin/bin/catkin_make_isolated -DCMAKE_BUILD_TYPE=Release

會遇到一些列報錯:

5.1 修復rosconsole* log相關(guān)問題error

用rosconsole_log4cxx.cpp里面的代碼全部替換源代碼src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp

替代rosconsole_log4cxx.cpp
https://gist.github.com/kintzhao/3947142d3161e11e5a0c326b79e9ebdb### 5.2 qt5庫相關(guān)的安裝

sudo apt install  libqt5widgets5  qtcreator qtbase5-dev qt5-qmake cmake

5.3 python-sip配置相關(guān)

sudo apt install  sip-dev python3-sip-dev python3-pyqt5.sip
sudo apt install  python3-pyqt5.sip python3-pyqt5 pyqt5-dev 

5.4 std::share_mutex 相關(guān) c++11 與c++17

下載 change_cpp.py 文件到ws路徑下,change_cpp.py

import os
from colorama import Fore, Style

WANTED_WIDTH = 100
DISPLAY_WIDTH = min(WANTED_WIDTH, os.get_terminal_size().columns - 2)
print("┏" + "".center(DISPLAY_WIDTH, "━") + "┓")
print(f"┃{Fore.RED}" + "CMakeLists to C++17 Utils".center(DISPLAY_WIDTH, " ") + f"{Style.RESET_ALL}┃")
print(f"┃{Style.BRIGHT+ Fore.BLACK}" + "Meltwin - 2023".center(DISPLAY_WIDTH, " ") + f"{Style.RESET_ALL}┃")
print("┗" + "".center(DISPLAY_WIDTH, "━") + "┛")
print()

REPLACE_FILTER = {
    "-std=c++11":"-std=c++17",
    "COMPILER_SUPPORTS_CXX11": "COMPILER_SUPPORTS_CXX17",
    "CMAKE_CXX_STANDARD 11": "CMAKE_CXX_STANDARD 17",
    "CMAKE_CXX_STANDARD 14": "CMAKE_CXX_STANDARD 17"
}

def fix_cmakelist(cmakelist_path: str) -> None:
    print(f"{Fore.YELLOW}? {Fore.RESET}Found {Fore.RED}{cmakelist_path}{Fore.RESET}", end=" ")
    with open(cmakelist_path, "r") as handle:
        data = handle.read()

    # Replacing
    changed = False
    for key, value in REPLACE_FILTER.items():
        if data.find(key) != -1:
            data = data.replace(key, value)
            changed = True

    if changed:
        with open(cmakelist_path, "w") as handle:
            handle.write(data)
    print(f"{Fore.GREEN}Fixed !" if changed else f"{Fore.BLUE}Nothing to change")

def walk_dir(dir: str, depth = 0) -> None:
    if depth >=2:
        return
    for d in os.listdir(dir):
        cmakelist_path = f"{dir}/{d}/CMakeLists.txt"
        if not os.path.isfile(cmakelist_path):
            walk_dir(f"{dir}/{d}", depth+1)
        else :
            fix_cmakelist(cmakelist_path)

if __name__ == "__main__":
    # Get all the CMakeLists.txt
    walk_dir("./src")

將當前src目錄下工程cmake中c++17方式的調(diào)整為c++11

  python3 change_cpp.py

5.5 opencv庫的安裝

 sudo apt install  libopencv-dev

5.6 assimp 庫安裝

 sudo apt install  libassimp-dev python3-pyassimp

5.7 ogre庫的安裝

sudo apt install  libogre-1.12-dev
sudo apt install  libogre1.12.10

5.8 ogre庫中class Vector3 傳統(tǒng)問題,

注釋掉文件plant_flag_tool.h imu_visual.h 中的class Vector3 定義

gedit /opt/ros/noetic_ws/src/visualization_tutorials/rviz_plugin_tutorials/src/plant_flag_tool.h

namespace Ogre
{
class SceneNode;
//class Vector3;
}

gedit /opt/ros/noetic_ws/src/visualization_tutorials/rviz_plugin_tutorials/src/imu_visual.h

namespace Ogre
{
//class Vector3;
class Quaternion;
}

編譯基本就可以通過了,一共184個包

<== Finished processing package [184 of 184]: 'xacro'

6. 安裝版

當前路徑安裝 或 指定路徑安裝文章來源地址http://www.zghlxwxcb.cn/news/detail-792587.html

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic

到了這里,關(guān)于ubuntu 22.04源碼裝ros1 noetic的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 如何像正常使用ROS一樣使用Docker ROS?Ubuntu22.04在docker中安裝noetic版本ROS

    如何像正常使用ROS一樣使用Docker ROS?Ubuntu22.04在docker中安裝noetic版本ROS

    自從買了新電腦,遇到的麻煩接連不斷。先是安裝Ubuntu系統(tǒng)安裝不上,安裝完成之后網(wǎng)卡、觸控板等硬件都沒有打上驅(qū)動,折騰了老半天,把ubuntu的內(nèi)核升級到了Ubuntu20.04所支持的最高版本,然而還是沒有解決驅(qū)動的問題,遂一氣之下將系統(tǒng)升級為了Ubuntu22.04,這一次安裝完系

    2024年04月17日
    瀏覽(49)
  • Ubuntu22.04安裝ROS

    在安裝ROS之前,需要先安裝Ubuntu22.04操作系統(tǒng)。您可以從Ubuntu官網(wǎng)下載Ubuntu22.04的最新版本鏡像文件,并創(chuàng)建一個可啟動的USB。您可以參考以下步驟: 在安裝ROS之前,需要先安裝Ubuntu22.04操作系統(tǒng)。您可以從Ubuntu官網(wǎng)下載Ubuntu22.04的最新版本鏡像文件,并創(chuàng)建一個可啟動的USB。

    2024年02月10日
    瀏覽(27)
  • ubuntu22.04安裝ros教程

    安裝 ROS 是一個比較復雜的過程,不同版本的 Ubuntu 系統(tǒng)對應(yīng)的 ROS 版本也不盡相同,因此需要認真閱讀官方教程。 下面是在 Ubuntu 22.04 上安裝 ROS 的一般步驟: 更新系統(tǒng):打開終端,運行以下命令:

    2024年02月16日
    瀏覽(21)
  • Ubuntu22.04安裝ROS2

    Ubuntu22.04安裝ROS2

    更新 apt 庫 安裝語言編碼并且設(shè)置格式: 更新軟件源 ps:如果在第三條命令輸入之后出現(xiàn)了一下警告或者類似報錯,如果沒有,直接跳到第四步即可 解決辦法就是設(shè)置 hosts 的域名位置跳轉(zhuǎn) List item 打開瀏覽器并且輸入然后粘貼進入:https://www.ipaddress.com 在下面的輸入欄中鍵入

    2024年02月02日
    瀏覽(50)
  • 【ROS系統(tǒng)】Ubuntu22.04系統(tǒng)中安裝ROS2系統(tǒng)

    參考博客:ROS 安裝詳細教程 —— Ubuntu22.0.4 LTS 安裝 首先,我們需要一個Ubuntu系統(tǒng)。 終端輸入指令: 從ubuntu系統(tǒng)界面進行設(shè)置: 設(shè)置-軟件升級-Ubuntu software- source code 為source code選擇國內(nèi)鏡像源 確定鏡像源可用 通過檢查此命令的輸出,確保已啟用Ubuntu Universe存儲庫。 apt-ca

    2024年04月27日
    瀏覽(25)
  • ROS2學習(一):Ubuntu 22.04 安裝 ROS2(Iron Irwini)

    ROS2學習(一):Ubuntu 22.04 安裝 ROS2(Iron Irwini)

    一、ROS2(Iron Irwini)介紹 官方文檔 Iron Irwini版本支持的平臺如下: 二、ROS2(Iron Irwini)安裝 1.設(shè)置編碼 2.使能代碼庫 現(xiàn)在用apt添加帶ROS 2 GPG 將存儲庫添加到源列表中 3.安裝ROS2 Iron 三、ROS2測試 在terminal 1 運行下面的指令: 在terminal 2 運行下面的指令: 四、ROS2卸載 刪除RO

    2024年02月10日
    瀏覽(67)
  • (Ubuntu22.04 Jammy)安裝ROS2 Humble

    (Ubuntu22.04 Jammy)安裝ROS2 Humble

    提示:以下內(nèi)容是已經(jīng)安裝了ubuntu22.04 下進行安裝ros2 請確保區(qū)域設(shè)置支持UTF-8,我們使用以下設(shè)置進行測試。 需要將ROS2 apt存儲庫添加到您的系統(tǒng)中,首先確保Ubuntu Universe存儲庫已啟用。 接著添加帶有apt的ROS 2 GPG密鑰 然后將存儲庫添加到源列表中 設(shè)置存儲庫后,更新您的a

    2024年02月01日
    瀏覽(36)
  • 在Ubuntu22.04系統(tǒng)安裝ROS Humble Hawksbill

    在Ubuntu22.04系統(tǒng)安裝ROS Humble Hawksbill

    目錄 一、簡述 二、下載安裝虛擬機 2.1下載 2.2安裝虛擬機 2.3安裝Ubuntu系統(tǒng) ?三、安裝ros 3.1設(shè)置編碼 3.2添加源 3.3安裝ros 3.4設(shè)置環(huán)境變量 四、檢驗是否安裝成功 五、常見問題說明 ROS Humble Hawksbill 是 ROS 2 的第八個版本。它是最新的長期支持版本的 ROS 2 發(fā)行版,可以輕松安裝

    2024年02月16日
    瀏覽(19)
  • ubuntu22.04,ros2使用自帶opencv讀取圖片

    ubuntu22.04,ros2使用自帶opencv讀取圖片

    從網(wǎng)上找了很久的ros2如何使用自帶的opencv庫或者自定義安裝opencv庫的教程,自己看的云里霧里的,跟著配置走下來依舊是不能使用,出現(xiàn)的最多的問題,就是找不到頭文件或者undefined reference to \\\'cv::imread(std::cxxll::basic stringchar, std::char traits, std::allocator const, int)\\\'這一類的未定義

    2024年02月10日
    瀏覽(25)
  • 樹莓派4B+Ubuntu22.04 Server安裝ROS2 Humble

    樹莓派4B+Ubuntu22.04 Server安裝ROS2 Humble

    通過本章學習,了解ROS2相關(guān)版本,能夠熟練掌握ROS2安裝相關(guān)操作,最終讓 Talker-listener 實例跑起來。 參考網(wǎng)站: ROS2官網(wǎng):https://www.ros.org/ ROS2 Humble版本:https://docs.ros.org/en/humble/Installation.html 注意:如果對ROS已經(jīng)有一定的了解,可以忽略此章節(jié)。 更多更具體的ROS介紹請查看

    2024年02月11日
    瀏覽(99)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包