昨天想安装一个catorgrapher,因为出错上网找解决方法结果七搞八搞还是没成功,结果今天想用roslaunch启动gazebo机器人模型就报错了,所有gazebo机器人模型都报错了,之前都是没问题能正常打开的,所以代码应该没有问题。用roslauch只能在rviz中正常打开机器人模型,但如果添加arbotix插件让机器人运动的话也会报类似的错误,重新创建工作空间、重装一遍ros后问题没有解决。
这是运行roslaunch启动功能包后产生的结果。
Traceback (most recent call last):
File "/opt/ros/melodic/lib/gazebo_ros/spawn_model", line 34, in <module>
from tf.transformations import quaternion_from_euler
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf/__init__.py", line 30, in <module>
from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 39, in <module>
from .buffer_interface import *
File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/buffer_interface.py", line 32, in <module>
import roslib; roslib.load_manifest('tf2_ros')
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 64, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/launcher.py", line 97, in _generate_python_path
m = rospack.get_manifest(pkg)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 171, in get_manifest
return self._load_manifest(name)
File "/usr/lib/python2.7/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/python2.7/dist-packages/rospkg/manifest.py", line 410, in parse_manifest_file
from rosdep2.rospack import init_rospack_interface, is_ros_package, is_system_dependency, is_view_empty
File "/usr/lib/python2.7/dist-packages/rosdep2/__init__.py", line 45, in <module>
from .lookup import RosdepDefinition, RosdepView, RosdepLookup, \
File "/usr/lib/python2.7/dist-packages/rosdep2/lookup.py", line 44, in <module>
from .sources_list import SourcesListLoader
File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 50, in <module>
from .gbpdistro_support import get_gbprepo_as_rosdep_data, download_gbpdistro_as_rosdep_data
File "/usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py", line 37
'releases/fuerte.yaml
^
SyntaxError: EOL while scanning string literal
以及
[urdf_spawner-4] process has died [pid 16947, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_model -urdf -model aubo_robot -param robot_description __name:=urdf_spawner __log:=/home/hsy/.ros/log/ba8e48b6-ce0a-11ec-846f-00e04c680090/urdf_spawner-4.log].
log file: /home/hsy/.ros/log/ba8e48b6-ce0a-11ec-846f-00e04c680090/urdf_spawner-4*.log
打开后只有gazebo环境,没有机器人模型了,利用roslaunch打开我自定义工作空间下其他功能包几乎都是这样的报错形式。
我的猜想是python的编译环境出问题了,但能力有限不知道怎么解决,网上类似的办法试过都没用。我机器人的包肯定没问题,这两天没有做任何修改,之前是能正常打开的。ros自身也没问题,自己能完美运行小海龟程序。这和ros应该没啥关系,应该是我后来配置的东西和原模型有啥冲突,但我除了重装系统真不知道怎么解决了。
感谢能给予帮助的各位,能正常打开机器人模型就可以了。