[spawn_model1-4] process has died [pid 6923, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_

一、问题描述:

joes@joes-PC:~/jiao/ROS_Projects/05_aotexueyuan_Project$ roslaunch ros23_urdf02_gazebo demo01_helloworld.launch
... logging to /home/joes/.ros/log/194743e4-922e-11ec-a5c5-84a938321ff7/roslaunch-joes-PC-6862.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://joes-PC:45837/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description:
    exit_code = sm.run()
  File "/opt/ros/melodic/lib/gazebo_ros/spawn_model", line 149, in run
    xml_parsed = xml.etree.ElementTree.fromstring(model_xml)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1311, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1657, in feed
    self._parser.Parse(data, 0)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 58-60: ordinal not in range(128)
[ INFO] [1645348724.584020193]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[spawn_model1-4] process has died [pid 6923, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn_model -urdf -model car -param robot_description __name:=spawn_model1 __log:=/home/joes/.ros/log/194743e4-922e-11ec-a5c5-84a938321ff7/spawn_model1-4.log].
log file: /home/joes/.ros/log/194743e4-922e-11ec-a5c5-84a938321ff7/spawn_model1-4*.log

[ INFO] [1645348724.602820002, 0.004000000]: Physics dynamic reconfigure ready.

二、解决:

sudo gedit /usr/lib/python2.7/xml/etree/ElementTree.py

加入以下代码:

reload(sys)
sys.setdefaultencoding("utf-8")

[spawn_model1-4] process has died [pid 6923, exit code 1, cmd /opt/ros/melodic/lib/gazebo_ros/spawn__第1张图片

你可能感兴趣的:(ROS,自动驾驶,人工智能,机器学习)