当我运行roslaunch mrobot_gazebo view_mrobot_gazebo.launch,发现有错误
ubuntu16.04
ROS Kinetic
ROS机器人开发实践 P146 6.72节
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/xacro/xacro", line 32, in
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py", line 42, in
from roslaunch import substitution_args
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 56, in
from .launch import ROSLaunchRunner
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 55, in
from roslaunch.nodeprocess import create_master_process, create_node_process
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py", line 52, in
from rosmaster.master_api import NUM_WORKERS
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py", line 35, in
from .main import rosmaster_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py", line 43, in
import rosmaster.master
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py", line 47, in
import rosmaster.master_api
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72, in
from rosmaster.util import xmlrpcapi
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py", line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named defusedxml.xmlrpc
然后我使用xacro.py工具 查看一下mrobot.urdf.xacro,有类似的错误
roscore
rosrun xacro xacro.py --check-order mrobot.urdf.xacro
Traceback (most recent call last):
File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py", line 42, in
from roslaunch import substitution_args
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 56, in
from .launch import ROSLaunchRunner
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 55, in
from roslaunch.nodeprocess import create_master_process, create_node_process
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py", line 52, in
from rosmaster.master_api import NUM_WORKERS
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py", line 35, in
from .main import rosmaster_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py", line 43, in
import rosmaster.master
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py", line 47, in
import rosmaster.master_api
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72, in
from rosmaster.util import xmlrpcapi
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py", line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named defusedxml.xmlrpc
但是实际上我的 python环境中 xacro defusedxml都已经有了呀
所以想请问作者一下,这个问题怎么解决好呢