Unbuntu20.04在安装catrographer时 执行了rosdep update 更改配置重新更新后,运行teleop_twist_keyboard时无法启动并报错 在查看了很多资料 不停安装卸载后 发现只是一个很小的问题。
错误如下所示:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/teleop_twist_keyboard/teleop_twist_keyboard.py", line 7, in <module>
import roslib; roslib.load_manifest('teleop_twist_keyboard')
File "/opt/ros/noetic/lib/python3/dist-packages/roslib/launcher.py", line 64, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/noetic/lib/python3/dist-packages/roslib/launcher.py", line 97, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 171, in get_manifest
return self._load_manifest(name)
File "/usr/lib/python3/dist-packages/rospkg/rospack.py", line 215, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self)
File "/usr/lib/python3/dist-packages/rospkg/manifest.py", line 414, in parse_manifest_file
_static_rosdep_view = init_rospack_interface()
File "/usr/lib/python3/dist-packages/rosdep2/rospack.py", line 61, in init_rospack_interface
return lookup.get_rosdep_view(DEFAULT_VIEW_KEY)
File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 631, in get_rosdep_view
view = self.create_rosdep_view(view_key, dependencies + [view_key], verbose=verbose)
File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 576, in create_rosdep_view
view.merge(db_entry, verbose=verbose)
File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 230, in merge
update_definition = RosdepDefinition(dep_name, dep_data, update_entry.origin)
File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 66, in __init__
raise InvalidData('rosdep data for [%s] must be a dictionary' % (self.rosdep_key), origin=origin)
rosdep2.core.InvalidData: rosdep data for [release-name] must be a dictionary
解决方法:
注释掉teleop_twiist_keyboard.py文件中的import roslib;roslib.load_manifest('teleop_twist_keyboard')
sudo gedit teleop_twist_keyboard.py
问题解决。