ur5在ros2下跑报错
·
AttributeError: module 'collections' has no attribute 'Iterable'
[ros2run]: Process exited with failure 1
遇到上述报错,ctrl+鼠标左键进入报错地方会发现:
def is_sequence(obj):
"""Test if "obj" is a sequence."""
return isinstance(obj, collections.Iterable)
def is_three_sequence(obj):
"""Test if "obj" is of a sequence type and three long."""
return isinstance(obj, collections.Iterable) and len(obj) == 3
改成:
def is_sequence(obj):
"""Test if "obj" is a sequence."""
return isinstance(obj, collections.abc.Iterable)
def is_three_sequence(obj):
"""Test if "obj" is of a sequence type and three long."""
return isinstance(obj, collections.abc.Iterable) and len(obj) == 3
问题解决
更多推荐
所有评论(0)