首页 > 编程知识 正文

cudnn下载清华源,ros使用教程

时间:2023-05-05 14:49:06 阅读:18376 作者:4772

1 .添加源

1.1 USTC源

sdosh-c './etc/ls B- release echo ' deb http://mirrors.ustc.edu.cn/ROS/Ubuntu/$ distrib _ codename main '/etc

如果执行有问题:

sdosh-c ' echo ' deb http://mirrors.ustc.edu.cn/ROS/Ubuntu/$ (LSB _ release-sc ) main'/etc/apt/sources

1.2 TUNA源

sudo sh-c './etc/ls B- release echo ' deb http://mirrors.tuna.Tsinghua.edu.cn/ROS/Ubuntu/` LSB _ release-cs

2 .添加私钥

wget 3359 raw.github user content.com/ROS/ROS distro/master/ROS.key-o-| sudo apt-keyadd -

如果无法添加:

sdoapt-key adv---keyserverhkp ://pool.sks-key servers.net---- recv-key0x b01 fa 116

3 .更新软件列表

Sudo Apt-get更新

注意:通常不需要使用名为sudo apt-get upgrade的命令。 将本地安装的软件与刚下载的软件列表中的相应软件进行比较,如果安装的软件版本太低,则会显示一条消息提示您进行更新。 名为sudo apt-get update的命令只需访问源列表中的每个网址以读取软件列表并将其存储在本地计算机上。

3.1 GPG错误

W: GPG错误:由于没有http://mirrors.ustc.edu.cn/ROS/ubuntuxenialinrelease 3358公钥,无法验证以下签名: NO_PUBKEY F42ED6FBAB17C654

错误原因:

公钥可能不足,或者公钥已用完。

解决方法:

既然没有公钥,当然要追加公钥。

sudo apt-key adv---key server key server.Ubuntu.com---recv-keysf 42e D6 fbab 17c 654

3.2 404非基础错误

W:仓库“http://PPA.launch pad.net/tualatrix/PPA/ubuntuxenial release”中没有发行文件。

N:无法验证来自此源的数据,因此使用它会带来潜在的风险。

有关创建N:仓库和用户配置的详细说明,请参阅apt-secure(8)文档。

W:是3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main /野性的相机Ary-amd64/Packages404notfound[1]

W:是3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main /野性的相机ary-i386/packages 404 nt found [

W:是3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main /野性的相机ary-all/packages 404 nt found [ id

W:是3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main/i18n/translation-zh _ cn 404 notfout

W:为3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main/i18n/translation-zh 404 not found [ iii

W:是3358 PPA.launch pad.net/tualatrix/PPA/Ubuntu/dists/xenial/main/i18n/translation-en 404 not found [ iii

W:无法下载http://pp

a.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文件:

#Rewrited by HAN_Letisl#For more information: https://www.cnblogs.com/letisl

#os-specific listings first

yaml https://pbdjb.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/osx-homebrew.yaml osx#generic

yaml https://pbdjb.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/base.yaml

yaml https://pbdjb.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/python.yaml

yaml https://pbdjb.coding.net/p/rosdeap_mirror/d/rosdeap_mirror/git/raw/master/ruby.yaml

gbpdistro https://pbdjb.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://pbdjb.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,但是它的功能又比较强大,使得开发更加快速、简单。这款软件适合菜鸟入门,因为很多配置都直接自动生成。

9.1安装包

事实上,中文官网似乎用了XX工具也不能打开。

9.2预先安装

安装pyint用于支持Python调试功能:

sudo apt-get install python-pip

sudo python-m pip install pylint

备注:如果出现问题,可参照:

简单讲,可以:

执行sudo apt-get install python-pip

sudo gedit /usr/野性的乌龟/pip,修改为:

#!/usr/野性的乌龟/python#GENERATED BY DEBIAN

importsys#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

注意:此处很奇怪,有时不改动可以直接用,有时2、3步骤顺序需要互换。

安装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使用。

参考资料

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。