ROS安装(国内源)
1.添加源
1.1 USTC源
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'
如执行有问题,则:
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
1.2 TUNA源
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'
注:配合https://www.cnblogs.com/letisl/p/11814384.html所提到的更换Ubuntu系统源,安装速度非国外源可比。
2.添加私钥
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
如不能添加,则:
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
3.更新软件列表
sudo apt-get update
注意:一般无需使用sudo apt-get upgrade这个命令,会把本地已安装的软件,与刚下载的软件列表里对应软件进行对比,如果发现已安装的软件版本太低,就会提示你更新。而sudo apt-get update这个命令,只是访问源列表里的每个网址读取软件列表,然后保存在本地电脑。
3.1 GPG 错误
W: GPG 错误:http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
错误原因:
可能是缺少公钥,也可能是公钥过期。
解决方法:
既然是没有公钥,自然是添加公钥。
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
3.2 404 Not Found错误
W: 仓库 “http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure() 手册以了解仓库创建和用户配置方面的细节。
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安装无关。
原因可能是PPA源中此用户删除了这些文件,但又添加了此源。
解决方法:
打开/etc/apt/sources.list.d文件夹,删除相关源文件。
4.安装ROS
sudo apt-get install ros-kinetic-desktop-full
注意:
- 按需选用full或者是base,base没有图形化界面,适合安装在机器人上;
- 按照Ubuntu版本选择ROS版本,kinetic版本适合于Ubuntu 16.04,其他Ubuntu版本各有其相应的ROS版本,不建议混用。
- 安装完成后,可以用下面的命令来查看可使用的包
apt-cache search ros-kinetic
5.初始化
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比较慢,容易失败。
如果多次尝试未果,可以尝试如下方法:
下面提供我个人设置的文件:
- 原始20-default.list:https://hansteam.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/20-default.list
- 修改后的20-default.list文件:
#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),需要使用的朋友可以自行设法使用。
备注:完全正确的结果图,供参考。
另一种可行的解决方案,安装XX工具,安装proxychains代理终端。只要代理靠谱,此方法理论上100%可行。
6.环境配置
#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“
发现最后一行居然多了两侧的引号,而且是中文引号。
原因在于,上述命令中的引号问题。
7.安装rosinstall
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
8.测试是否安装成功
roscore
如果显示如下:
started core service [/rosout]
代表安装成功。
9.安装IDE
RoboWare Studio是ROS的一款IDE,但是它的功能又比较强大,使得开发更加快速、简单。这款软件适合菜鸟入门,因为很多配置都直接自动生成。
直接进入其中文官网,http://cn.roboware.me/#/home,下载deb包安装即可。
9.1安装包
事实上,中文官网似乎用了XX工具也不能打开。
提供个人下载链接:roboware-studio_1.1.0-1514335284_amd64.deb:https://hansteam.coding.net/s/ffc0144b-9c57-4173-974a-ba03986d2719
9.2预先安装
安装pyint用于支持Python调试功能:
sudo apt-get install python-pip
sudo python -m pip install pylint
备注:如果出现问题,可参照:
https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/84536406
简单讲,可以:
- 执行sudo apt-get install python-pip
- sudo gedit /usr/bin/pip,修改为:
#!/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()) - pip install --upgrade pip
- sudo pip install --ignore-installed enum34
- sudo python -m pip install pylint
安装clang-format获得更好的代码阅读体验,自动格式化整理代码:
sudo apt-get install clang-format-3.8
9.3正式安装
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。
参考资料
ROS安装(国内源)的更多相关文章
- ubuntu ARM换国内源和国内源安装ROS
ubuntu arm换国内源: https://www.cnblogs.com/yongy1030/p/10315569.html 国内源安装ROS: https://blog.csdn.net/ch ...
- ruby 编译安装,gem国内源ruby.taobao.org
centos6.6final 一.安装依赖包(使用默认CENTOS更新源): # yum install openssl* openssl-devel zlib-devel gcc gcc-c++ m ...
- debian9使用国内源安装docker以及一些使用方法
debian9使用国内源安装docker以及一些使用方法 首先, 我的环境是debian, 容器是centos debian 扔源 # deb-src [arch=amd64] https://m ...
- yum更换国内源 yum下载rpm包 源码包安装
7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 yum更换国内源 cd /etc/yum.repo.d/ 删除源 rm -f dvd.repo rm -f C ...
- python 使用国内源安装软件
python linux 等 使用国内源安装软件 速度更快 你值得拥有 ! 豆瓣源:pip install -i https://pypi.douban.com/simple/ 阿里源:pip ins ...
- pip安装时使用国内源,加快下载速度
国内源: 新版ubuntu要求使用https源,要注意. 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.c ...
- yum更换国内源、yum下载rpm包、源码包安装 使用介绍
第5周第4次课(4月19日) 课程内容: 7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装 7.6 yum更换国内源 当yum仓库的软件不好用时,例如很多yum源都是国外的 ...
- Anaconda安装第三方库与pip和conda 添加国内源
Anaconda安装第三方库 PIP使用命令 Anaconda命令 pip和conda 添加国内源 1:PIP相关命令 卸载 pip uninstall XXX 1.升级pip python -m p ...
- Windows设置国内源阿里云镜像加速与离线安装pip包的方法
Windows设置国内源阿里云镜像加速1.先在 windows “文件资源管理器” 地址栏 输入 %APPDATA% 按回车,打开程序自定义设置文件夹然后,创建名为 pip 的文件夹,用于存放 pip ...
随机推荐
- Kubernetes 基本概念和术语
Kubernetes 基本概念和术语 Kubernetes 中大部分概念如 Node.Pod.Replication Controller. Service 等都可以看做一种 "资源对象&q ...
- webbrowser 修改浏览器版本的方法
http://blog.csdn.net/herogui/article/details/51982474
- C# 遍历控件名称
List<string> list = new List<string>(); list.Add("textBox2"); list.Add("t ...
- Socket 对象(内建)方法
函数 描述 服务器端套接字 s.bind() 绑定地址(host,port)到套接字, 在AF_INET下,以元组(host,port)的形式表示地址. s.listen() 开始TCP监听.back ...
- Web大文件上传断点续传解决方案
最近遇见一个需要上传百兆大文件的需求,调研了七牛和腾讯云的切片分段上传功能,因此在此整理前端大文件上传相关功能的实现. 在某些业务中,大文件上传是一个比较重要的交互场景,如上传入库比较大的Excel表 ...
- [CF912D]Fishes - 求数学期望,乱搞
D. Fishes time limit per test 1 second memory limit per test 256 megabytes input standard input outp ...
- Android 一般动画animation和属性动画animator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...
- ship(动态规划)
(ships.pas/c/cpp) 来源:<奥赛经典>(提高篇)[问题描述]PALMIA国家被一条河流分成南北两岸, 南北两岸上各有N个村庄. 北岸的每一个村庄有一个唯一的朋友在南岸,且他 ...
- 使用 vuetron 调试 mpvue 项目
简介 由于小程序开发工具的封闭,我们无法通过安装 chrome 插件来方便地使用 vue-devtools 调试我们的 mpvue 项目.vuetron 是一个 vue.js 的项目调试工具, 同时支 ...
- linux文档与目录的相关命令
Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.首先Linux没有“盘(C盘.D盘.E盘)”的概念.已经建立文件系统的硬盘分区被挂载到某一个目录下,用户通过操作目录来 ...