小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
-
Ubuntu16.04安装ROS Melodic,出现以下错误:
请问怎么处理呢,谢谢(参考的教程https://blog.csdn.net/qq_43313298/article/details/124187225)
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'
-
Ubuntu18.04,写错了抱歉
-
我也是这个问题,估计是gitee链接的问题
-
我解决了,请依次执行命令:
输入以下命令并选择安装rosdepc的数字选项:
wget http://fishros.com/install -O fishros && . fishros
再次尝试:
rosdepc update
如果还是不行请按照这个顺序执行命令:
wget http://fishros.com/install -O fishros && . fishros
sudo rosdepc init
rosdepc update
-
@Fatal
这两天有不少小伙伴遇到这个问题,应该是rosdistro仓库修改了些东西造成的humble版本更新时的bug,可以通过下面的命令指定更新的ros版本解决。使用下面的命令代替rosdepc update
rosdepc update --rosdistro=$ROS_DISTRO
如果遇到错误可以将
$ROS_DISTRO
替换为你的ROS版本名称
rosdepc update --rosdistro=你的ROS版本名称
比如
rosdepc update --rosdistro=melodic rosdepc update --rosdistro=kinetic
-
@小鱼 试过了还是不能解决,请问还有别的解决方案么
-
@745526203 看一下具体的错误?是相同问题吗?另外系统版本和rosdepc版本分别是?
-
-
@小鱼 (Sorry I haven't figured out how to install Chinese typing method on my Ubuntu)... I have the same problem, and previous solutions don't not work for me. Below is my error message:
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/python3.6/dist-packages/roscdep2/main.py", line 146, in rosdep_main
exit_code = _rosdep_main(args)
File "/usr/local/lib/python3.6/dist-packages/roscdep2/main.py", line 446, in _rosdep_main
return _no_args_handler(command, parser, options, args)
File "/usr/local/lib/python3.6/dist-packages/roscdep2/main.py", line 455, in _no_args_handler
return command_handlerscommand
File "/usr/local/lib/python3.6/dist-packages/roscdep2/main.py", line 685, in command_update
ros_distro=options.ros_distro)
File "/usr/local/lib/python3.6/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/python3.6/dist-packages/roscdep2/gbpdistro_support.py", line 149, in get_gbprepo_as_rosdep_data
distro_file = get_release_file(gbpdistro)
File "/usr/local/lib/python3.6/dist-packages/roscdep2/rosdistrohelper.py", line 77, in get_release_file
dist_file = rosdistro.get_distribution_file(get_index(), distro)
File "/usr/local/lib/python3.6/dist-packages/rosdistro/init.py", line 120, in get_distribution_file
return create_distribution_file(dist_name, data)
File "/usr/local/lib/python3.6/dist-packages/rosdistro/distribution_file.py", line 134, in create_distribution_file
dist_file = DistributionFile(dist_name, d)
File "/usr/local/lib/python3.6/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'