ros的安装教程_ROS教程

ros的安装教程_ROS教程总结一下这两天安装ROS的过程。1配置软件库桌面左侧栏点searchyourcomputer,输入updates,点Software&Updates,将main,universe,multiuniverse,restricted全都勾上,将Downloadfrom换成中科大的http://mirrors.ustc.edu,cn/ubuntu2…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

总结一下这两天安装ROS的过程。

 

1 配置软件库

桌面左侧栏 点search your computer,输入updates,点 Software & Updates,将main,universe,multiuniverse,restricted全都勾上,将Download from换成中科大的  http://mirrors.ustc.edu,cn/ubuntu ros的安装教程_ROS教程

 

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结果是这样的

ros的安装教程_ROS教程

又或者是你在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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/195171.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • metrics小常识

    metrics小常识Metrics,我们听到的太多了,熟悉大数据系统的不可能没听说过metrics,当我们需要为某个系统某个服务做监控、做统计,就需要用到Metrics。举个例子,一个图片压缩服务:每秒钟的请求数是多少(TPS)?平均每个请求处理的时间?请求处理的最长耗时?等待处理的请求队列长度?又或者一个缓存服务:缓存的命中率?平均查询缓存的时间?基本上每一个服务、应用都需要

    2022年10月28日
  • impala中转换字段类型,类型强转

    impala中转换字段类型,类型强转cast(字段名as要转换为的类型)例如:要将student表中的age字段(原本是int类型)转成string类型,如下:cast(student.ageasstring)asage–年龄

    2022年9月5日
  • SFTP第一篇——搭建SFTP Server

    SFTP第一篇——搭建SFTP Server一、Mac搭建SftpServer1、检查ftp工具打开命令行,输入“ftp–help”,检查是否已经安装ftp工具。如果没有,通过以下命令安装: brewinstalltelnet brewinstallinetutils brewlink–overwriteinetutils 如果没有brew,通过以下命令安装:/usr/bin/…

    2022年10月21日
  • 写一段代码在遍历 ArrayList 时移除一个元素?

    写一段代码在遍历 ArrayList 时移除一个元素?今天楼主继续分享一道经典Java面试题并进行相关知识点的拓展: 上题:写一段代码在遍历ArrayList时移除一个元素?该问题的关键在于面试者使用的是ArrayList的remove()还是Iterator的remove()方法。是使用正确的方式来实现在遍历的过程中移除元素,而不会出现ConcurrentModificationException异常的示例代码。…

    2022年7月22日
  • springboot打包成jar_springboot精简打包

    springboot打包成jar_springboot精简打包Spring boot打war部署到tomcat上- 第一步 “` @MapperScan(“com.yglh.mapper”) @SpringBootApplication public class YglhApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(Yg..

    2022年8月8日
  • char类型「建议收藏」

    char类型「建议收藏」1、JAVA中,char占2字节,16位。可在存放汉字2、char赋值chara='a';//任意单个字符,加单引号。chara='中';//任意单个中文字,加单

    2022年8月2日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号