joint_state_publisher_gui-5] process has died

joint_state_publisher_gui-5] process has died_第1张图片

问题描述

ROS加载xacro时出现的错误,看最后一行白色字
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 2758-2763: ordinal not in range(128)
意思是说编码错误,我估计是xacro里的中文注释编解码出错,由于这个是python编码的,所以需要python支持中文才行。

解决方案

1、在终端输入

sudo gedit /usr/lib/python2.7/sitecustomize.py

2、在py文件开头插入

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

joint_state_publisher_gui-5] process has died_第2张图片
参考来源
ubuntu18.04-ros-melodic中,rviz显示模型异常,或者提示rviz No transform from [link1] to [link2],的问题解决

你可能感兴趣的:(ROS,ROS)