ubuntu20.04 ROS noetic在终端中运行
rosrun tf view_frames
报错如下所示:
Listening to /tf for 5.0 seconds
Done Listening
b'dot - graphviz version 2.42.3 (0)\n'
Traceback (most recent call last):
File "/opt/ros/melodic/lib/tf/view_frames", line 119, in <module>
generate(dot_graph)
File "/opt/ros/melodic/lib/tf/view_frames", line 89, in generate
m = r.search(vstr)
TypeError: cannot use a string pattern on a bytes-like object
解决方法:终端中运行(注意,此时如果不用sudo的话无法在vim里面修改代码,必须用sudo授予其权限)
sudo vim /opt/ros/noetic/lib/tf/view_frames
然后打开的VIM编辑中修改代码(89行处):
m = r.search(vstr.decode('utf-8'))