“rosrun tf view_frames”运行失败 TypeError: cannot use a string pattern on a bytes-like object
1 Listening to /tf for 5.0 seconds 2 Done Listening 3 b'dot - graphviz version 2.43.0 (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
打开出问题的文件:
"/opt/ros/melodic/lib/tf/view_frames"
用下面代码替换掉89行:
m = r.search(vstr.decode('utf-8'))