重要提示
rosdepc update常见错误及解决方案
-
这两天有不少小伙伴遇到rosdepc update更新失败问题,主要有两个,这里小鱼介绍下并提供解决方案。
一、使用rosdepc update后出现Expected file type is 'distribution'
这个问题,应该是rosdistro仓库修改了些东西造成的humble版本更新时的bug,可以通过下面的命令指定更新的ros版本解决。
ERROR: Rosdep experienced an error: Expected file type is 'distribution' Please go to the rosdepc page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdepc 发生错误了,请关注微信公众号:鱼香ROS,找小鱼反馈哦 rosdepc version: 0.21.0 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 146, in rosdep_main exit_code = _rosdep_main(args) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 446, in _rosdep_main return _no_args_handler(command, parser, options, args) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 455, in _no_args_handler return command_handlers[command](options) File "/usr/local/lib/python2.7/dist-packages/roscdep2/main.py", line 677, in command_update ros_distro=options.ros_distro) File "/usr/local/lib/python2.7/dist-packages/roscdep2/sources_list.py", line 516, in update_sources_list rosdep_data = get_gbprepo_as_rosdep_data(dist_name) File "/usr/local/lib/python2.7/dist-packages/roscdep2/gbpdistro_support.py", line 149, in get_gbprepo_as_rosdep_data distro_file = get_release_file(gbpdistro) File "/usr/local/lib/python2.7/dist-packages/roscdep2/rosdistrohelper.py", line 77, in get_release_file dist_file = rosdistro.get_distribution_file(get_index(), distro) File "/usr/local/lib/python2.7/dist-packages/rosdistro/__init__.py", line 120, in get_distribution_file return create_distribution_file(dist_name, data) File "/usr/local/lib/python2.7/dist-packages/rosdistro/distribution_file.py", line 134, in create_distribution_file dist_file = DistributionFile(dist_name, d) File "/usr/local/lib/python2.7/dist-packages/rosdistro/distribution_file.py", line 45, in __init__ assert 'type' in data, "Expected file type is '%s'" % DistributionFile._type AssertionError: Expected file type is 'distribution'
解决方案
使用下面的命令代替rosdepc update
rosdepc update --rosdistro=$ROS_DISTRO
如果遇到错误可以将
$ROS_DISTRO
替换为你的ROS版本名称
rosdepc update --rosdistro=你的ROS版本名称
比如
rosdepc update --rosdistro=melodic rosdepc update --rosdistro=kinetic
二、Ubable to process source [xxxx/fuerte.yaml]
这个直接忽略即可,不影响使用。
-
@小鱼 在 rosdepc update常见错误及解决方案 中说:
rosdepc update --rosdistro=$ROS_DISTRO
一键装机里面的 rosdepc update 应该是没有问题,大概是网络的原因,我第一次也没有成功,多来了几次就成功了