日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

ubuntu20.04安装noetic版本ros

發布時間:2025/4/16 Ubuntu 68 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu20.04安装noetic版本ros 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

  • 1. ubuntu設置為中文界面
  • 2.配置Ubuntu軟件倉庫
  • 3.設置sources.list
  • 4.設置密鑰
  • 5. 安裝ros
  • 6. 設置環境
  • 7. 測試ROS安裝是否成功
  • 8. 初始化rosdep
    • 8.1 如/etc/ros/rosdep/sources.list.d目錄存在
    • 8.2 /etc/ros/rosdep/sources.list.d目錄不存在

1. ubuntu設置為中文界面

Ubuntu20.04 英文界面換成中文界面

2.配置Ubuntu軟件倉庫



3.設置sources.list

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

利用 “sh -c” 命令,它可以讓 bash 將一個字串作為完整的命令來執行,這樣就可以將 sudo 的影響范圍擴展到整條命令,這條命令的意思是把"deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main"雙引號中的內容添加到/etc/apt/sources.list.d/ros-latest.list文件中。

4.設置密鑰

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

5. 安裝ros

安裝之前先執行sudo apt update更新軟件源,我們這里安裝桌面完整版本:

sudo apt install ros-noetic-desktop-full

6. 設置環境

你需要在使用ROS的每個bash終端中source這個腳本。

source /opt/ros/noetic/setup.bash

而下面這些命令可以在每次啟動新的shell窗口時很方便地為你自動source一下這個腳本

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc

7. 測試ROS安裝是否成功

在終端輸入:
roscore 啟動RosMaster
再新建一個終端,輸入:
rosrun turtlesim turtlesim_node
再新建一個終端,輸入:
rosrun turtlesim turtle_teleop_key

8. 初始化rosdep

開始使用ROS之前,先初始化rosdep,rosdep能夠輕松地安裝要編譯的源代碼的系統依賴關系,rosdep是ROS核心組件運行的基礎

rosdep是ros的一個功能包,在安裝ros時會自動安裝.在使用時需要初始化.ros包有兩個不同類型的依賴項:build依賴項和run依賴項。rosdep就是用來檢查包的丟失依賴項,并且完成下載和安裝。

執行sudo rosdep init,提示sudo: rosdep:找不到命令
需要安裝sudo apt-get install python3-rosdep2
然后重新

ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.

如果 /etc/ros/rosdep/sources.list.d目錄存在,則只需修改/etc/ros/rosdep/sources.list.d目錄下的文
件,如果/etc/ros/rosdep/sources.list.d目錄不存在,需要手動創建上面所述的目錄:
/etc/ros/rosdep/sources.list.d (當然說的是在etc目錄下…),自己制作20-default.list文件。

8.1 如/etc/ros/rosdep/sources.list.d目錄存在

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

在每一個https://raw.githubusercontent.com/前面添加https://ghproxy.com/
修改好的

# os-specific listings first yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# generic yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

改后后執行rosdep update,前面4個網址訪問成功,但最后1個還是訪問,錯誤信息如下:

kandi@ubuntu:/etc/ros/rosdep/sources.list.d$ rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml ERROR: unable to process source [https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:Failed to download target platform data for gbpdistro:<urlopen error [Errno 111] Connection refused> Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml ERROR: error loading sources list:<urlopen error <urlopen error [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

提示無法訪問https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml和https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml,此時需要修改index-v4.yaml所在的位置。
需要特別注意:

ros noetic版本基于python3,所以在/usr/lib/python3路徑下修改,其他ros版本若基于python2的,需要找到對應的python2 路徑進行修改。

修改的方法是在下面這些文件中https://raw.githubusercontent.com前面加上https://ghproxy.com/
(1) 修改

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

(2) 修改在__init__.py文件中修改index-v4.yaml的位置

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


繼續rosdep update,但還有出錯的信息:

把下面幾個文件對應的地方也改了

/usr/lib/python3/dist-packages/rosdep2/sources_list.py/usr/lib/python3/dist-packages/rosdep2/rep3.py /usr/lib/python3/dist-packages/rosdistro/manifest_provider/github.py此文件兩個地方需要修改

繼續rosdep update,還是有問題,比如:

ERROR: unable to process source [https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]

在多執行幾次rosdep update就ok了,信息如下:

kandi@ubuntu:~$ rosdep update reading in sources list data from /etc/ros/rosdep/sources.list.d Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml Skip end-of-life distro "ardent" Skip end-of-life distro "bouncy" Skip end-of-life distro "crystal" Skip end-of-life distro "dashing" Skip end-of-life distro "eloquent" Add distro "foxy" Add distro "galactic" Skip end-of-life distro "groovy" Skip end-of-life distro "hydro" Skip end-of-life distro "indigo" Skip end-of-life distro "jade" Skip end-of-life distro "kinetic" Skip end-of-life distro "lunar" Add distro "melodic" Add distro "noetic" Add distro "rolling" updated cache in /home/kandi/.ros/rosdep/sources.cache

8.2 /etc/ros/rosdep/sources.list.d目錄不存在

手動創建上面所述的目錄: /etc/ros/rosdep/sources.list.d ,自己創建20-default.list文件。
在終端輸入

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

在gedit 20-default.list上粘貼下面的內容:

#os-specific listings first yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx #generic yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte #newer distributions (Groovy, Hydro, …) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

總結

以上是生活随笔為你收集整理的ubuntu20.04安装noetic版本ros的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产美女无遮挡网站 | 精品视频一区二区三区四区五区 | 青青青免费在线视频 | 欧美三日本三级少妇三99 | 男人天堂欧美 | 国产va在线观看 | 日本少妇性生活 | 日日夜夜狠狠干 | 色多多av | 毛片网页| 双性懵懂美人被强制调教 | 久久这里只有精品国产 | 欧美性生交大片免费看 | 欧美色吊丝 | 韩国妻子的朋友 | 欧美日本高清视频 | 亚洲网在线| 免费成人激情视频 | 日韩精品一区二区亚洲av观看 | 浓精喷进老师黑色丝袜在线观看 | 凹凸精品熟女在线观看 | 最新黄色av网址 | 找个毛片看看 | 免费手机av| 不卡中文字幕av | 91精品啪在线观看国产线免费 | 91美女诱惑| 天堂va蜜桃一区二区三区漫画版 | 亚洲国产精品无码观看久久 | 日本一区视频 | 国产精品一区二区三区四区在线观看 | 欧美一区二区高清 | 青娱乐超碰 | 91精品国产成人www | 少妇av在线 | 怡春院一区二区 | 91av视频免费观看 | 国产日韩激情 | 亚洲精品97久久 | 日韩成人短视频 | 一区二区视频免费观看 | 尤物网站在线观看 | 欧美一级淫片 | 久久一区二区三区视频 | 亚洲成人无码久久 | 四川一级毛毛片 | 奇米影视久久久 | 爱操av| 无码国产色欲xxxx视频 | 日本久久黄色 | 成人欧美一区二区三区在线播放 | 女优视频在线观看 | 欧美| 久久久久久久久久久国产精品 | 亚洲精品久久久久中文字幕二区 | 午夜影院在线观看18 | 午夜精品久久久久久久四虎美女版 | 在线观看免费的av | 国产精品白嫩极品美女视频 | 婷婷精品一区二区三区 | 3d动漫精品啪啪一区二区下载 | 欧美日韩国产成人精品 | 免费毛片播放 | 人妻精品久久久久中文 | 亚洲成人免费av | 鲁一鲁在线视频 | 国产精品污 | 在线观看久 | a午夜| 亚洲av无码乱码国产麻豆 | 热久久久久久 | 特黄aaaaaaaaa毛片免费视频 | 亚洲综合另类小说 | 日本黄a三级三级三级 | 成人看片在线观看 | 图书馆的女友在线观看 | 日韩av片在线 | 一区二区三区影院 | 91精品综合久久久久久五月天 | 西野翔之公侵犯中文字幕 | 久久久久久国产精品免费 | 天堂av中文字幕 | 久久国内偷拍 | 日本免费一区二区三区 | 久久久国产精品黄毛片 | 小明成人免费视频 | 午夜成年视频 | www噜噜噜 | 搡老熟女老女人一区二区 | 日本福利在线观看 | 欧美又粗又长 | 男人添女人下部高潮全视频 | 影音先锋黄色资源 | 在线观看亚洲免费视频 | 亚洲免费观看高清 | 内射一区二区 | 在线播放少妇奶水过盛 | 国产一区二区三区视频播放 | 日本青青草视频 |