ubuntu 20.04 “rosrun tf view_frames“运行失败
ubuntu20.04 ROS noetic
终端中运行
$ rosrun tf view_frames
报错
1 Listening to /tf for 5.0 seconds 2 Done Listening 3 b'dot - graphviz version 2.42.3 (0)\n' 4 Traceback (most recent call last): 5 File "/opt/ros/melodic/lib/tf/view_frames", line 119, in <module> 6 generate(dot_graph) 7 File "/opt/ros/melodic/lib/tf/view_frames", line 89, in generate 8 m = r.search(vstr) 9 TypeError: cannot use a string pattern on a bytes-like object
解决方法
终端中运行
1 sudo vim /opt/ros/noetic/lib/tf/view_frames
然后打开的VIM编辑中修改代码
1 m = r.search(vstr.decode('utf-8'))