Ubuntu16.04&18.04装ROS 基本排错安装

笔者在Ubuntu16.04 及 Ubuntu18.04 下均成功安装ROS,二者的debug思路和步骤一致。以下debug指令及步骤笔者均亲自试验过,请放心使用,一定能安装成功!

物质准备和知识储备:

Ubuntu 16.04/18.04 :最好买一个笔记本专运行linux软件。学生党们可以用双系统安装,不过千万不要浪费时间安装虚拟机运行ROS,除非真的仅仅想随便玩玩,真的绝对卡!

知识:看得懂linux基本常见命令。例如:cd sudo apt-get 等

安装ROS:

总体按着
Ubuntu16.04 ROS官网安装Kenetic教程
Ubuntu18.04 ROS官网安装Melodic教程
进行,除了在1.2步:设置软件源应当从Mirror里用推荐的软件源:

image

在此推荐USTC的软件源

image

其他的跟随教程。如果安装顺利,一路没有error,在终端输入 roscore 后会显示详细资料,或是调试后能够显示乌龟,说明安装成功。

image

没有成功?OK .

rosdep init 找不到命令。请输入:

sudo apt-get install python-rosdep

sudo rosdep init

website down ,解决方案:

首先修改系统host文件中的ip地址:
sudo gedit /etc/hosts,在文件最上面添加一下语句:151.101.84.133 raw.githubusercontent.com,保存退出,再sudo rosdep init

机理:执行sudo rosdep init会在/etc/ros/rosdep/sources.list.d产生一个名为20-default.list的文件,内容为:

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

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

因此假如在上述步骤sudo rosdep init仍旧失败,则把/etc/ros/rosdep/sources.list.d20-default.list 内容清空,复制粘贴上面的黑色框内容,保存。完成。sudo rosdep update

sudo rosdep update 报错

执行rosdep update会在/home/xxx/.ros/rosdep/sources.cache(xxx是你的用户名)产生一个文件夹,里面有一堆缓存文件

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值