亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 291
粉絲 0
評論 0
訪問量 450466
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
AutoWare.auto 與ROS2 親測安裝成功
原創(chuàng)
3485人瀏覽過

鏡像下載、域名解析、時間同步請點擊 阿里云開源鏡像站

AutoWare.auto 安裝實踐

1. 相關(guān)程序版本說明

ubuntu版本:20.04 ADE:4.4.0

Autoware.auto版本(基于ROS2):autoware.auto foxy, ros foxy

<!--最開始使用的 **ubuntu版本:18.04版本,后面發(fā)現(xiàn)ros foxy需要ubuntu20版本,本來想著切到utoware.auto dashing版本,由于本人能力有限,不知道咋整,直接升級了系統(tǒng)**-->

2. Docker安裝

以下操作,請確定自己已經(jīng)換源了,不然下載很慢的,參考Ubuntu20.04軟件源更換 - 知乎

Ubuntu系統(tǒng)中,軟件源文件地址為:/etc/apt/sources.list

1.備份原來的源,將以前的源備份一下,以防以后可以用的。

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.打開/etc/apt/sources.list文件,在前面添加如下條目,并保存。

$ sudo vim /etc/apt/sources.list(可將vim更換為自己熟悉的編輯器)

添加阿里源

  1. deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2. # deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  4. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  6. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  7. # deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  8. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  10. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

3.更新

更新源

$ sudo apt-get update

如出現(xiàn)依賴問題,解決方式如下:

$ sudo apt-get -f install

更新軟件:

$ sudo apt-get upgrade

官方安裝教程:Install Docker Engine on Ubuntu | Docker Documentation

// 卸載舊版本docker

  1. #Uninstall old versions
  2. $ sudo apt-get remove docker docker-engine docker.io containerd runc
  3. #Uninstall Docker Engine
  4. $ sudo apt-get purge docker-ce docker-ce-cli containerd.io
  5. $ sudo rm -rf /var/lib/docker
  6. $ sudo rm -rf /var/lib/containerd

// 使用docker repository安裝docker engine

  1. #step1:在新主機上首次安裝Docker Engine之前,需要設置Docker存儲庫。之后,您可以從存儲庫安裝和更新Docker
  2. #更新apt軟件包索引并安裝軟件包,以允許apt通過HTTPS使用存儲庫
  3. $ sudo apt-get install \
  4. ca-certificates \
  5. curl \
  6. gnupg \
  7. lsb-release
  8. #Step2:Add Docker’s official GPG key:
  9. $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  10. #Step3:Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
  11. $ echo \
  12. "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  13. $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  14. #Step4:Install Docker Engine
  15. $ sudo apt-get update
  16. $ sudo apt-get install docker-ce docker-ce-cli containerd.io //如果沒有指定版本,默認安裝最高版本
  17. #Step5:Verify that Docker Engine is installed correctly by running the hello-world image.
  18. $ sudo docker run hello-world
  19. Hello from Docker!
  20. This message shows that your installation appears to be working correctly.

Manage Docker as a non-root user

  1. # 創(chuàng)建docker用戶組
  2. $ sudo groupadd docker
  3. #將當前用戶加入docker用戶組
  4. $ sudo usermod -aG docker $USER
  5. #Log out and log back in so that your group membership is re-evaluated.
  6. $ newgrp docker
  7. #Verify that you can run docker commands without sudo.
  8. $ docker run hello-world
  9. $ sudo chmod 666 /var/run/docker.sock
  10. #重啟電腦或者重啟docker服務
  11. $ sudo systemctl daemon-reload
  12. $ sudo systemctl restart docker
  13. $ sudo docker login registry.gitlab.com # Use token from Gitlab

3. Autoware.auto容器安裝

3.1 程序說明

基于Docker封裝的開發(fā)容器,包含以下內(nèi)容:

file

3.2 ADE安裝

ADE 是模塊化的 Docker-based 工具,它確保所有的開發(fā)者構(gòu)建項目時有一個共同的、一致的開發(fā)環(huán)境

官網(wǎng)安裝文檔:Installation — ADE 4.4.0dev documentation

  1. #install it in “/usr/local/bin” PATH
  2. $ cd /usr/local/bin
  3. $ sudo wget https://gitlab.com/ApexAI/ade-cli/-/jobs/1859684348/artifacts/raw/dist/ade+x86_64
  4. $ sudo mv ade+x86_64 ade
  5. $ sudo chmod +x ade
  6. $ which ade
  7. /path/to/ade
  8. # 查看ade版本號
  9. $ ade --version
  10. <version>
  11. # Update ade
  12. $ sudo ./ade update-cli #這個地方需要一段時間
  13. Newer version available:
  14. 4.4.0
  15. 4.3.0
  16. 4.2.0
  17. Do you want to update to version 4.4.0 [y/N]: y
  18. ?
  19. <!-- '注意:升級ade版本可能會報錯 “PermissionError: [Errno 13] Permission denied: '/usr/local/bin/ade'”,切換root用戶再次執(zhí)行,問題解決'->

3.3 Autoware容器安裝

官網(wǎng)安裝文檔:Installation with ADE

  1. 使用ADE安裝Autoware.auto環(huán)境,ROS2和Autoware.auto已經(jīng)預編譯,安裝了二進制版本,默認安裝在/opt目錄下
  1. $ mkdir -p ~/adehome
  2. $ cd ~/adehome
  3. $ touch .adehome
  4. $ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
  5. '注意:不要使用官網(wǎng)視頻課程里面的遞歸循環(huán)安裝,編譯會報錯'
  6. 'git clone --recurse-submodules https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git'
  7. $ cd AutowareAuto
  8. #拉取一些其他分支到master
  9. $ vcs import < autoware.auto.$ROS_DISTRO.repos
  10. #切換到發(fā)布分支,如果不切換,默認使用master 分支代碼,可能包含一些正在開發(fā)的功能,建議切換穩(wěn)定發(fā)布版本
  11. $ git checkout tags/1.0.0 -b release-1.0.0
  12. #共享環(huán)境變量
  13. $ cd ~
  14. $ mv ~/.bashrc ~/adehome/.bashrc
  15. $ ln -s ~/adehome/.bashrc
  16. $ cd ~/adehome/AutowareAuto
  17. #其實,有很多預先配置好的ADE環(huán)境供我們選擇,官網(wǎng)提供了三個ADE配置文件:AMD64/ARM64/AMD64+LGSVL
  18. $ ls -l .aderc*
  19. lrwxrwxrwx 1 wtcl wtcl 17 12 23 12:14 .aderc -> .aderc-amd64-foxy
  20. -rw-rw-r-- 1 wtcl wtcl 407 12 23 12:25 .aderc-amd64-dashing
  21. -rw-rw-r-- 1 wtcl wtcl 499 12 23 12:25 .aderc-amd64-dashing-lgsvl
  22. -rw-rw-r-- 1 wtcl wtcl 401 12 23 12:25 .aderc-amd64-foxy
  23. -rw-rw-r-- 1 wtcl wtcl 490 12 23 12:25 .aderc-amd64-foxy-lgsvl
  24. lrwxrwxrwx 1 wtcl wtcl 17 12 23 12:14 .aderc-arm64 -> .aderc-arm64-foxy
  25. -rw-rw-r-- 1 wtcl wtcl 407 12 23 12:25 .aderc-arm64-dashing
  26. -rw-rw-r-- 1 wtcl wtcl 401 12 23 12:25 .aderc-arm64-foxy
  27. lrwxrwxrwx 1 wtcl wtcl 23 12 23 12:14 .aderc-lgsvl -> .aderc-amd64-foxy-lgsvl
  28. #可以看到有好幾種可選的環(huán)境,其中.aderc-lgsvl對應的環(huán)境中包含LGSVL模擬器。然后,可以通過如下命令,切換并進入相應的ADE環(huán)境:
  29. #二選一安裝,這個地方安裝有點慢,需要等待一會,ade --rc 命令可以加載并啟動相關(guān)的鏡像容器
  30. $ ade --rc .aderc-amd64-foxy start --update --enter
  31. <!-- '注意:啟動ade報錯
  32. “Starting ade with the following images:
  33. ade-foxy | ec7293d289ad | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/ade-foxy:master
  34. binary-foxy | 9ffc6c658b7a | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/binary-foxy:master
  35. ade_registry.gitlab.com_autowarefoundation_autoware.auto_autowareauto_amd64_binary-foxy_master
  36. xhost: unable to open display "localhost:10.0"
  37. WARNING: Could not find xhost, you won't be able to launch X applications"
  38. 解決辦法:設置本地顯示命令-- $ export DISPLAY=localhost:10.0 $ xhost +>
  39. #What is where inside ADE?
  40. ade$ls /opt
  41. AutowareAuto # image: binary-foxy:master
  42. lgsvl # image: ade-lgsvl/foxy:2020.06
  43. ros # image: ade-foxy:master

ade安裝過程中可能需要訪問gitlab的令牌,需要登錄gitlab申請

  1. In one terminal, source the setup file and then run a C++ talker:
  2. ade$ ade enter
  3. ade$ source ~/AutowareAuto/install/setup.bash
  4. ade$ ros2 run demo_nodes_cpp talker
  5. In another terminal source the setup file and then run a Python listener:
  6. ade$ cd ~/AutowareAuto
  7. ade$ source ~/AutowareAuto/install/setup.bash
  8. ade$ ros2 run demo_nodes_py listener
  9. You should see the talker saying that its Publishing messages and the listener saying I heard those messages. This verifies both the C++ and Python APIs are working properly. Hooray!
  10. #docker容器 清理無用鏡像,卷
  11. $ cd ~/adehome/AutowareAuto
  12. $ ade start
  13. #To assess the disk usage situation, run the following command:
  14. $ docker system df
  15. #Use docker system prune to remove any Docker items not used for currently running containers:
  16. $ docker system prune -a --volumes
  17. #Restart your system after installing the new NVIDIA driver.
  18. ade$ exit
  19. $ ade stop
  20. $ ade start --update --enter

安裝完成后運行

ade $ros2 run demo_nodes_cpp talker 不工作,沒辦法,繼續(xù)使用源碼進行編譯安裝

issue回復:colcon build failed on trajectory.hpp file not found (#67) · Issues · ApexAI / AutowareClass2020 · GitLab

  1. 使用源碼編譯安裝Autoware.auto 和 ROS2

Autoware.auto官網(wǎng)安裝文檔:Installation w/o ADE

ROS2官網(wǎng)安裝文檔:Building ROS 2 on Ubuntu Linux — ROS 2 Documentation: Foxy documentation

  1. #如果安裝了舊版本,先卸載
  2. $ sudo apt-get purge ros-foxy*
  3. $ sudo rm -rf /etc/ros
  4. $ sudo gedit ~/.bashrc
  5. 刪除那個東西bash
  6. $ source ~/.bashrc
  7. ?
  8. #安裝編譯工具包
  9. #Apt packages
  10. $ sudo apt install -y git cmake python3-pip
  11. ?
  12. #Python modules
  13. $ pip3 install -U colcon-common-extensions vcstool
  14. ?
  15. #First, the ROS 2 core components and tools must be installed
  16. ?
  17. #安裝ROS2核心包
  18. ?
  19. #設置語言環(huán)境,確保語言環(huán)境支持UTF-8
  20. $ locale # check for UTF-8
  21. ?
  22. #只檢查是否有可用更新,給出匯總報告和提示信息
  23. $ sudo apt update
  24. ?
  25. #查看可升級的軟件的全部版本信息
  26. $ sudo apt list --upgradable -a
  27. $ sudo apt install locales
  28. $ sudo locale-gen en_US en_US.UTF-8
  29. $ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
  30. $ export LANG=en_US.UTF-8
  31. $ locale # verify settings
  32. ?
  33. #確保ros2倉庫可用
  34. $ apt-cache policy | grep universe
  35. ?
  36. #如果不可用,執(zhí)行下面命令
  37. $ sudo apt install software-properties-common
  38. $ sudo add-apt-repository universe
  39. ?
  40. #需要在系統(tǒng)中添加ROS 2 apt存儲庫。為此,請首先使用如下所示的apt授權(quán)GPG密鑰:
  41. #Now add the ROS 2 apt repository to your system. First authorize our GPG key with apt.
  42. $ sudo apt update
  43. $ sudo apt install curl gnupg lsb-release
  44. $ sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
  45. ?
  46. #然后將存儲庫添加到源列表中
  47. #Then add the repository to your sources list.
  48. $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
  49. ?
  50. #Install development tools and ROS tools
  51. sudo apt update && sudo apt install -y \
  52. build-essential \
  53. cmake \
  54. git \
  55. python3-colcon-common-extensions \
  56. python3-flake8 \
  57. python3-pip \
  58. python3-pytest-cov \
  59. python3-rosdep \
  60. python3-setuptools \
  61. python3-vcstool \
  62. wget
  63. # install some pip packages needed for testing
  64. python3 -m pip install -U \
  65. flake8-blind-except \
  66. flake8-builtins \
  67. flake8-class-newline \
  68. flake8-comprehensions \
  69. flake8-deprecated \
  70. flake8-docstrings \
  71. flake8-import-order \
  72. flake8-quotes \
  73. pytest-repeat \
  74. pytest-rerunfailures \
  75. pytest
  76. # install Fast-RTPS dependencies
  77. sudo apt install --no-install-recommends -y \
  78. libasio-dev \
  79. libtinyxml2-dev
  80. # install Cyclone DDS dependencies
  81. sudo apt install --no-install-recommends -y \
  82. libcunit1-dev
  83. ?
  84. # Get ROS 2 code
  85. # ROS2源碼下載,Install ROS 2 packages
  86. $ mkdir -p ~/ros2_foxy/src
  87. $ cd ~/ros2_foxy
  88. $ wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
  89. $ vcs import src < ros2.repos
  90. ?
  91. #Install dependencies using rosdep
  92. $ sudo apt update
  93. $ sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
  94. $ sudo rosdep init
  95. $ rosdep update
  96. $ rosdep install --from-paths src --reinstall --ignore-src -y --rosdistro=foxy --skip-keys "fastcdr rti-connext-dds-5.3.1 urdfdom_headers"
  97. $ rosdep check --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-5.3.1 urdfdom_headers"
  98. ?
  99. 'Note: If you’re using a distribution that is based on Ubuntu (like Linux Mint) but does not identify itself as such, you’ll get an error message like Unsupported OS [mint]. In this case append --os=ubuntu:focal to the above command.'
  100. #rti-dds可以單獨安裝
  101. #https://docs.ros.org/en/foxy/Installation/DDS-Implementations.html
  102. ?
  103. #工作空間編譯源碼安裝
  104. #檢查ROS環(huán)境變量,確保沒有使用“source /opt/ros/${ROS_DISTRO}/setup.bash”設置過環(huán)境變量
  105. $ printenv | grep -i ROS #如果顯示空,后面編譯會有問題
  106. PWD=/pathto/ros2_foxy
  107. $ cd ~/ros2_foxy/
  108. $ colcon build --symlink-install
  109. $ colcon test
  110. $ colcon test-result --verbose
  111. ?
  112. ?
  113. #Demo test,In one terminal, source the setup file and then run a C++ talker:
  114. $ source ~/ros2_foxy/install/setup.bash
  115. $ ros2 run demo_nodes_cpp talker
  116. ?
  117. #In another terminal source the setup file and then run a Python listener:
  118. $ source ~/ros2_foxy/install/setup.bash
  119. $ ros2 run demo_nodes_py listener
  120. ?
  121. =================================================以上是ROS2 源碼安裝,下面是安裝Autoware.auto源碼安裝 =============================
  122. ?
  123. $ export ROS_DISTRO = foxy
  124. $ echo $ROS_DISTRO
  125. ?
  126. #ROS2安裝完成后, 設置環(huán)境變量
  127. $ source ~/ros2_foxy/install/setup.bash
  128. ?
  129. #將ROS環(huán)境變量添加到bashrc文件里面
  130. $ echo "source ~/ros2_foxy/install/setup.bash" >> ~/.bashrc
  131. $ source ~/.bashrc
  132. ?
  133. # Autoware.Auto project requires some ROS 2 packages in addition to the core components. The tool rosdep allows an automatic search and installation of such dependencies.
  134. $ sudo apt update
  135. $ sudo apt install -y python3-rosdep
  136. $ sudo rosdep init
  137. $ rosdep update
  138. ?
  139. #安裝Autoware.Auto依賴的ROS2的其它包,rosdep會自動搜索安裝
  140. $ mkdir -p ~/adehome
  141. $ cd ~/adehome
  142. $ touch .adehome
  143. $ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
  144. $ cd AutowareAuto
  145. $ vcs import < autoware.auto.$ROS_DISTRO.repos
  146. $ export ROS_VERSION=2
  147. ?
  148. #rosdep 一次安裝src下所有依賴
  149. $ rosdep install --reinstall -y -i --from-paths src
  150. ?
  151. // 這一步可有可不有。
  152. //目的是切換想要安裝的autoware版本,如果不切換master將使用最新分支
  153. #Checkout the latest release by checking out the corresponding tag or release branch.
  154. $ git checkout tags/1.0.0 -b release-1.0.0
  155. ?
  156. # If running tests or demos, also pull binary files with
  157. $ git lfs pull --exclude="" --include="*"
  158. ?
  159. #共享環(huán)境變量
  160. $ cd ~
  161. $ mv ~/.bashrc ~/adehome/.bashrc
  162. $ ln -s ~/adehome/.bashrc
  163. ?
  164. #打開一個干凈的ade容器進行編譯
  165. $ ade stop
  166. $ sudo ade update-cli
  167. $ ade --rc .aderc-amd64-foxy-lgsvl start --update --enter
  168. ade$ cd AutowareAuto
  169. ade$ rm -rf build/ install/ log/
  170. ?
  171. #To build all packages in Autoware.Auto, navigate into the AutowareAuto directory and run
  172. ade$ colcon build
  173. ade$ colcon test
  174. ade$ colcon test-result --verbose
  175. 上述步驟中,第二步命令可以拉取一些其他分支到master,補充一些文件。我開始沒有執(zhí)行這個命令,
  176. 導致在執(zhí)行colcon build,出現(xiàn)無法找到文件
  177. autoware_auto_msgs/msg/trajectory.hpp的錯誤。
  178. 如果colcon 不起作用,配置colcon 環(huán)境變量
  179. Take the defaults file that comes with the Autoware.Auto source checkout and add it to your shell startup;
  180. echo COLCON_DEFAULTS_FILE
  181. $ echo "export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml" >> .bashrc
  182. 或者手工導入
  183. $ export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml
  184. 編譯完一定要source
  185. $ source /opt/AutowareAuto/setup.bash
  186. $ source ~/AutowareAuto/install/setup.bash

———使用一個干凈的ADE環(huán)境———

我們可能遇到的很多問題都是由于代碼版本、舊的編譯文件存在等導致,所以需要更新ade和docker容器,以及清理一些舊的build等文件,可以通過以下操作完成:

  1. $ ade stop
  2. $ sudo ade update-cli
  3. $ ade start --update --enter
  4. ade$ cd AutowareAuto
  5. ade$ rm -rf build/ install/ log/ src/external/
  6. ade$ git pull
  7. ade$ vcs import < autoware.auto.$ROS_DISTRO.repos

———ADE環(huán)境的使用———

  • 執(zhí)行ade命令(如ade start、ade enter等)時,要確保當前命令行在路徑

~/adehome/AutowareAuto 中;

  • 開啟ADE環(huán)境:

$ ade start

  • 進入ADE環(huán)境(此時,會輸出一些鏡像信息):

$ ade enter

  • 所有的鏡像掛在在/opt下面,可以查看:

ade$ ls /opt

  • 退出并停止ADE環(huán)境(使用完最好手動停止ADE環(huán)境,以關(guān)閉Docker):

ade$ exit

$ ade stop

———安裝過程中可能會出現(xiàn)少包,版本不兼容問題,可以使用下面命令排查———

  1. #查找所有已安裝的軟件包
  2. $dpkg -l——查看所有已安裝的軟件包
  3. ?
  4. #清除所以刪除包的殘余配置文件
  5. $dpkg -l |grep ^rc|awk ‘{print $2}’ |tr [”"n”] [” “]|sudo xargs dpkg -P -
  6. ?
  7. #查看需卸載的軟件包
  8. $dpkg -l |grep 軟件名
  9. ?
  10. #clean 命令刪除所有的軟件安裝包。
  11. $ sudo apt-get clean
  12. ?
  13. #autoclean 命令刪除不再可用的軟件安裝包。
  14. $ sudo apt-get autoclean
  15. ?
  16. #remove 命令移除 以及任何依賴這個包的其它包
  17. $sudo apt-get remove 軟件名
  18. ?
  19. #用purge 命令清除式卸載
  20. $apt-get purge <pakage_name>
  21. ?
  22. #autoremove 命令刪除不再需要的依賴軟件包。
  23. $ sudo apt-get autoremove
  24. ?
  25. #install 命令下載軟件包,以及所有依賴的包,同時進行包的安裝或升級
  26. $ apt-get install 軟件名
  27. #libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.4 is to be installed
  28. $ sudo apt install libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2
  29. ?
  30. #reinstall 命令重新安裝軟件包。
  31. $ apt-get --reinstall install softname1
  32. ?
  33. #升級來自 Debian 鏡像的包列表,如果你想安裝當天的任何軟件,至少每天運行一次,而且每次修改了
  34. $ sudo apt-get update
  35. ?
  36. #升級所有已經(jīng)安裝的包為最新可用版本。不會安裝新的或移除老的包。建議同時使用 '-u' 選項,因為這樣你就能看到哪些包將會被升級
  37. $ apt-get upgrade -u
  38. ?
  39. #apt-get upgrade 類似,除了 dist-upgrade 會安裝和移除包來滿足依賴關(guān)系。因此具有一定的危險性
  40. $ apt-get dist-upgrade -u
  41. ?
  42. #在軟件包名稱和描述中,搜索包含xxx的軟件包
  43. $ apt-cache search
  44. ?
  45. #顯示某個軟件包的完整的描述
  46. $apt-cache show
  47. ?
  48. #Dpkg方式安裝軟件源
  49. $ dpkg -i package_name.deb
  50. ?
  51. #移除式卸載:
  52. $dpkg -r pkg1 pkg2 ...
  53. ?
  54. #清除式卸載:
  55. $dpkg -P pkg1 pkg2..
  56. ?
  57. #將刪除相關(guān)軟件,同時刪除該軟件的配置文件
  58. $ dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -p
  59. ?
  60. #重新安裝已安裝的包
  61. $ dpkg -l | grep ^ii | awk '{print $2}' | xargs sudo apt-get reinstall

3.4 Autoware.auto 相機車道線檢測demo 展示

1. 代碼及錄制視頻下載

代碼下載

  1. $ cd ~/adehome/AutowareAuto/
  2. $ ade start
  3. $ ade enter
  4. $ git clone https://gitee.com/knowmefly/camera-hands-on-ws.git

視頻下載:https://download.csdn.net/download/jiluonian/22771297 下載 laneVideo.h264 視頻文件放置在 ~/adehome/camera-hands-on-ws/src/lane_detection_data_loader/resources/ 目錄下

2. 編譯安裝

  1. $ ade enter
  2. $ cd camera-hands-on-ws/
  3. $ rm -rf build/ install/ log/
  4. $ colcon build
  5. '可能找不到opencv,安裝opencv庫'
  6. $sudo apt install libopencv-dev python3-opencv

3.運行視頻加載、圖像處理、可視化節(jié)點

  • 運行視頻加載節(jié)點
  1. # terminal 1
  2. $ ade enter
  3. $ cd camera-hands-on-ws/
  4. $ source install/setup.bash
  5. $ ros2 run lane_detection_data_loader lane_detection_data_loader_node
  • 運行圖像處理節(jié)點
  1. # terminal 2
  2. $ ade enter
  3. $ cd camera-hands-on-ws/
  4. $ source install/setup.bash
  5. $ ros2 run lane_detection_projection lane_detection_projection_node
  • 運行可視化節(jié)點
  1. # terminal 3
  2. $ ade enter
  3. $ cd camera-hands-on-ws/
  4. $ source install/setup.bash
  5. $ ros2 run lane_detection_visualization lane_detection_visualization_node
  6. # terminal 4
  7. $ ade enter
  8. $ export QT_DEBUG_PLUGINS=1
  9. $ export DISPLAY=:0.0
  10. $ rviz2
  • 運行rviz2報錯
  1. 'qt.qpa.xcb: could not connect to display localhost:10.0
  2. 'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  3. 'This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
  4. 'Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
  5. 'Aborted (core dumped)''

解決辦法:

加載插件跟蹤

$ export QT_DEBUG_PLUGINS=1

$ export DISPLAY=:0.0

在vi /etc/profile內(nèi)添加export DISPLAY=xserverip:0.0 執(zhí)行source /etc/profile 第二步:然后ssh終端安裝xorg并使用xclock測試能否回傳圖像:

apt-get install xorg

xclock

執(zhí)行后桌面會跳出一個時鐘的圖案

file

本文轉(zhuǎn)自:https://blog.csdn.net/baiyefenglin/article/details/122921360

本博文版權(quán)歸博主所有,轉(zhuǎn)載請注明地址!如有侵權(quán)、違法,請聯(lián)系admin@php.cn舉報處理!
全部評論 文明上網(wǎng)理性發(fā)言,請遵守新聞評論服務協(xié)議
0條評論
作者最新博文
關(guān)于我們 免責申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓,幫助PHP學習者快速成長!
關(guān)注服務號 技術(shù)交流群
PHP中文網(wǎng)訂閱號
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時隨地碎片化學習
PHP中文網(wǎng)抖音號
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學習!
    全站2000+教程免費學