[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: <robot name="my_c...
 * /rosdistro: melodic
 * /rosversion: 1.14.12
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_model1 (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [6872]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 194743e4-922e-11ec-a5c5-84a938321ff7
process[rosout-1]: started with pid [6884]
started core service [/rosout]
process[gazebo-2]: started with pid [6891]
process[gazebo_gui-3]: started with pid [6908]
process[spawn_model1-4]: started with pid [6923]
the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
[ INFO] [1645348724.337832150]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1645348724.339012949]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1645348724.422424183]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1645348724.423308018]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/gazebo_ros/spawn_model", line 239, in <module>
    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")

  • 27
    点赞
  • 79
    收藏
    觉得还不错? 一键收藏
  • 14
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值