Value error: 'ascii' codec can't decode byte 0xe6 in position 26: ordinal not in range(128) The traceback for the exception was written to the log file
原因:工作空间中有中文编码问题,导致的运行ros异常
解决办法:
1、解决urdf生成异常问题
urdf文件中不允许有中文,所有当输入中文的时候容易出问题,解决方案:
①在根目录下:/opt/ros/melodic/lib/python2.7/dist-packages
新建一个sitecustomize.py文件
cd /opt/ros/melodic/lib/python2.7/dist-packages sudo gedit sitecustomize.py
②在其中添加内容:
#coding=utf8 import sys reload(sys) sys.setdefaultencoding('utf8')