【ROS1::melodic】虚拟机下melodic安装教程2/2

重要!重要!重要!

解决melodic过程中遇到的问题。

执行命令:

rosdep update

出现错误如下:(注意:命令中不需要sudo

 意思就是网速太慢了,下载不了20-default.list这个文件。

自己在路径下(/etc/ros/rosdep/sources.list.d)创建这个文件。 

mkdir -r /etc/ros/rosdep/sources.list.d

 可以复制添加文件内容

# os-specific listings first
# yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:/etc/ros/rosdep/sources.list.d/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

 在/etc/resolv.conf将原先的nameserver屏蔽,添加两个nameserver

打开etc/hosts文件添加

 还有的教程是修改时间值,我改了没有用

 

解决掉20-default.list这个文件。

执行rosdep update更新不成功的问题。

太多方法都没解决。

 解决方法:

1、下载rosdistro-master.zip

链接:https://pan.baidu.com/s/1WSZRVfL0cld0WIzhrYKkBw 
提取码:zxcv

2、修改20-default.list文件内容如下

# os-specific listings first
# yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:/etc/ros/rosdep/sources.list.d/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

yaml file:/etc/ros/rosdep/sources.list.d/rosdistro-master/rosdep/base.yaml
yaml file:/etc/ros/rosdep/sources.list.d/rosdistro-master/rosdep/python.yaml
yaml file:/etc/ros/rosdep/sources.list.d/rosdistro-master/rosdep/ruby.yaml
gbpdistro file:/etc/ros/rosdep/sources.list.d/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

3、将下载好的rosdistro-master.zip解压后复制到路径(/etc/ros/rosdep/sources.list.d)下,

执行命令:

 该路径中文件情况

 【关键步骤】下面执行3个命令修改其中的网址信息

 DEFAULT_SOURCES_LIST_URL行的信息

 执行命令,

 REP3_TARGETS_URL行

 执行命令,

 DEFAULT_INDEX_URL行

 3条命令修改完成后,执行 

rosdep update

 出现下述界面说明安装成功。

接下来测试安装环境:

 我擦,这么情况,继续解决

继续执行命令:

sudo apt-get install ros-melodic-desktop

 待安装完成后

再行执行roscore

 打开3个终端,测试小乌龟

 ROS环境搭建完成。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

acodeEngineer

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

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

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

打赏作者

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

抵扣说明:

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

余额充值