sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
如執行有問題,則:html
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
注:配合http://www.javashuo.com/article/p-qumnkkio-bh.html所提到的更換Ubuntu系統源,安裝速度非國外源可比。python
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
如不能添加,則:git
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
sudo apt-get update
注意:通常無需使用sudo apt-get upgrade這個命令,會把本地已安裝的軟件,與剛下載的軟件列表裏對應軟件進行對比,若是發現已安裝的軟件版本過低,就會提示你更新。而sudo apt-get update這個命令,只是訪問源列表裏的每一個網址讀取軟件列表,而後保存在本地電腦。github
W: GPG 錯誤:http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease: 因爲沒有公鑰,沒法驗證下列簽名: NO_PUBKEY F42ED6FBAB17C654
多是缺乏公鑰,也多是公鑰過時。ubuntu
既然是沒有公鑰,天然是添加公鑰。ruby
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
W: 倉庫 「http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release」 沒有 Release 文件。 N: 沒法認證來自該源的數據,因此使用它會帶來潛在風險。 N: 參見 apt-secure(8) 手冊以瞭解倉庫建立和用戶配置方面的細節。 W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-all/Packages 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-zh_CN 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-zh 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-en 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/dep11/Components-amd64.yml 404 Not Found [IP: 91.189.95.83 80] W: 沒法下載 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/dep11/icons-64x64.tar 404 Not Found [IP: 91.189.95.83 80] W: 部分索引文件下載失敗。若是忽略它們,那將轉而使用舊的索引文件。
首先說明此問題與ROS安裝無關。bash
緣由多是PPA源中此用戶刪除了這些文件,但又添加了此源。工具
打開/etc/apt/sources.list.d文件夾,刪除相關源文件。測試
sudo apt-get install ros-kinetic-desktop-full
注意:fetch
apt-cache search ros-kinetic
sudo rosdep init
rosdep update
可能出現問題:
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.
解決方案:
多試幾回!國內鏈接githubsercontent.com比較慢,容易失敗。
若是屢次嘗試未果,能夠嘗試以下方法:
下面提供我我的設置的文件:
#Rewrited by HAN_Letisl #For more information: https://www.cnblogs.com/letisl # os-specific listings first yaml https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/osx-homebrew.yaml osx # generic yaml https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/base.yaml yaml https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/python.yaml yaml https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/ruby.yaml gbpdistro https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/fuerte.yaml fuerte # newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
注意:其Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml在20-default.list不顯式出現,所以未能將這個文件包括在其中,我的鏡像中有這個文件(https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/index-v4.yaml),須要使用的朋友能夠自行設法使用。
備註:徹底正確的結果圖,供參考。
#echo 「source /opt/ros/kinetic/setup.bash」 >> ~/.bashrc 這個命令是錯誤的,勿用。引號是中文引號,與下一條對比。
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
可能出現問題:
「source:未找到命令
問題緣由:
根據提示,打開/.bashrc文件:
」source /opt/ros/kinetic/setup.bash「
發現最後一行竟然多了兩側的引號,並且是中文引號。
緣由在於,上述命令中的引號問題。
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
roscore
若是顯示以下:
started core service [/rosout]
表明安裝成功。
RoboWare Studio是ROS的一款IDE,可是它的功能又比較強大,使得開發更加快速、簡單。這款軟件適合菜鳥入門,由於不少配置都直接自動生成。
直接進入其中文官網,http://cn.roboware.me/#/home,下載deb包安裝便可。
事實上,中文官網彷佛用了XX工具也不能打開。
提供我的下載連接:roboware-studio_1.1.0-1514335284_amd64.deb:https://hansteam.coding.net/s/ffc0144b-9c57-4173-974a-ba03986d2719
安裝pyint用於支持Python調試功能:
sudo apt-get install python-pip
sudo python -m pip install pylint
備註:若是出現問題,可參照:
https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/84536406
簡單講,能夠:
#!/usr/bin/python # GENERATED BY DEBIAN import sys # Run the main entry point, similarly to how setuptools does it, but because # we didn't install the actual entry point from setup.py, don't use the # pkg_resources API. from pip import __main__ if __name__ == '__main__': sys.exit(__main__._main()) #modify when install roboware @hans,2019.11.8 #from pip import main #if __name__ == '__main__': # sys.exit(main())
安裝clang-format得到更好的代碼閱讀體驗,自動格式化整理代碼:
sudo apt-get install clang-format-3.8
sudo dpkg -i roboware-studio_1.1.0-1514335284_amd64.deb
安裝完畢後:
roboware-studio
輸入以上命令,便可打開該IDE使用。
也可使用最新版:roboware-studio_1.2.0-1524709819_amd64.deb,RoboWare_Studio_Manual_1.2.0_CHS.pdf。