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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

ros的安装教程_ROS教程

發布時間:2023/12/19 综合教程 33 生活家
生活随笔 收集整理的這篇文章主要介紹了 ros的安装教程_ROS教程 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

總結一下這兩天安裝ROS的過程。

1 配置軟件庫

桌面左側欄 點search your computer,輸入updates,點 Software & Updates,將main,universe,multiuniverse,restricted全都勾上,將Download from換成中科大的 http://mirrors.ustc.edu,cn/ubuntu

2 設置軟件源

打開/etc/apt/sources.list,將以下內容加入。編輯之前可以先進行備份。

deb http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe

deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe

deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe

deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe

deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe

deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe

如果是用sudo gedit/etc/apt/sources.list打開的,可能無法編輯(文本只讀),我使用的是下面的命令

sudo nano /etc/apt/sources.list

保存之后,執行

sudo apt-get update

sudo apt-get upgrade

3 按照指導安裝

接下來的步驟參考官網教程就好。

官網教程

4 遇到的問題及解決

4.1 配置軟件庫的錯誤

在關閉Software & Updates時候需要reload。如果reload結果是這樣的

又或者是你在sudo apt-get update的時候報這種錯:

W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:10 and /etc/apt/sources.list:64

W: Target Packages (universe/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:10 and /etc/apt/sources.list:64

W: Target Translations (universe/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:10 and /etc/apt/sources.list:64

W: Target Translations (universe/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:10 and /etc/apt/sources.list:64

說明你在sources.list里面有兩個相同的軟件源,它們的后綴可能不一樣(比如有的是main,有的是restricted,有的可能是包含關系如restricted 和 main restricted 等)。將多余的刪掉。我是將重復的刪去一個,將包含與被包含的刪除被包含的。之后再重新sudo apt-get update就可以了。

4.2 設置軟件源的錯誤

我曾在sources.list里面將

http://packages.ros.org/ros/ubuntu $(lsb_release Release

改成了

http://packages.ros.org/ros/ubuntu trusty

之后就變成了下面的錯誤

W: The repository ‘http://ppa.launchpad.net/fcitx-team/nightly/ubuntu xenial Release’ does not have a Release file.

N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.

N: See apt-secure(8) manpage for repository creation and user configuration details.

E: Failed to fetch http://ppa.launchpad.net/fcitx-team/nightly/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

然后我在software&update->other software里面把

http://ppa.launchpad.net/fcitx-team/nightly/ubuntu xenial Release

的勾選去掉了,就不會報does not have a Release file的錯誤了。

4.3 按照官網教程安裝時出現的錯誤

執行到Set up your keys這一步的時候,出錯

gpg: requesting key B01FA116 from hkp server ha.pool.sks-keyservers.net

gpgkeys: key 421C365BD9FF1F717815A3895523BAEEB01FA116 can’t be retrieved

gpg: no valid OpenPGP data found.

gpg: Total number processed: 0

gpg: keyserver communications error: keyserver helper general error

gpg: keyserver communications error: unknown pubkey algorithm

gpg: keyserver receive failed: unknown pubkey algorithm

受[2]的啟發,我將宿主機上的藍燈關掉了,就沒錯了。

接著我執行

sudo apt-get update

報錯

Err:15 http://10.0.0.167/files/51160000022738DE/packages.ros.org/ros/ubuntu xenial/main i386 Packages

Hash Sum mismatch

Fetched 554 kB in 1s (315 kB/s)

Reading package lists… Done

E: Failed to fetch http://10.0.0.167/files/51160000022738DE/packages.ros.org/ros/ubuntu/dists/xenial/main/binary-i386/Packages.gz Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

網上說這個錯誤應該跟GFW有關,于是我又重新打開了藍燈,再執行一次,沒錯了

接著執行

sudo apt-get install ros-kinetic-desktop-full

報錯

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

ros-kinetic-desktop-full : Depends: ros-kinetic-desktop but it is not going to be installed

Depends: ros-kinetic-perception but it is not going to be installed

Depends: ros-kinetic-simulators but it is not going to be installed

Depends: ros-kinetic-urdf-tutorial but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

按照[3]中的方法,我執行

sudo apt-get update && sudo apt-get upgrade

在結果中出現了

The following packages have been kept back:

linux-generic-hwe-16.04 linux-headers-generic-hwe-16.04

linux-image-generic-hwe-16.04

0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

于是我分別執行

sudo apt-get install linux-generic-hwe-16.04 linux-headers-generic-hwe-16.04

sudo apt-get install linux-image-generic-hwe-16.04

但是還是沒能解決上面Depends的錯誤,于是我照[4]中的辦法來做,同時又按照[5]中的辦法手動安裝缺失的依賴包。之后再重新執行sudo apt-get install ros-kinetic-desktop-ful,這會終于成功了!


參考資料

[1]https://blog.csdn.net/qq_37193603/article/details/72900797

[2]https://community.hortonworks.com/questions/147024/gpgkeys-key-b9733a7a07513cad-cant-be-retrieved-1.html

[3]https://answers.ros.org/question/243920/how-to-install-ros-kinetic-ubuntu-1604/

[4]https://blog.csdn.net/xiangxianghehe/article/details/78483799

[5]https://blog.csdn.net/l_h2010/article/details/46831245

總結

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

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