ubuntu 16.04安装ROS Kinetic

本文档记录了在Ubuntu系统中安装ROS Kinetic的详细过程,包括添加源、设置代理、修改配置文件以及解决rosdep更新问题。重点介绍了如何处理因github访问超时导致的安装障碍,提供了更换代理源和手动下载fuerte.yaml的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天尝试在ubuntu环境下安装ROS Kinetic,发现过程还不是很顺,我这里分享一下我的过程:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo apt-get update

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

下面修改代理:

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

由于github国内访问总是超时,我把它换成了代理,然后fuerte.yaml需要手动下载哈,下载地址:
https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
然后修改一下下面的路径,我的fuerte.yaml的路径为:
file:///media/data/T1061601/fuerte.yaml

# os-specific listings first
yaml https://raw.fastgit.org/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.fastgit.org/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.fastgit.org/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.fastgit.org/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro file:///media/data/T1061601/fuerte.yaml  fuerte

#gbpdistro https://cdn.jsdelivr.net/gh/ros/rosdistro@master/releases/fuerte.yaml future
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

保存退出

:wq

修改一下python2.7的代理

sudo vim /usr/lib/python2.7/dist-packages/rosdistro/__init__.py

像下面这样

# DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL='https://raw.fastgit.org/ros/rosdistro/master/index-v4.yaml'
:wq

然后运行:

rosdep update

参考文献

rosdep update出错解决办法,下载文件替换法——No such file or directory: ‘/etc/ros/rosdistro/master/index-v4.yaml
Installing ROS kinetic on Ubuntu 16.04 LTS
Ubuntu install of ROS Kinetic

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值