ros / geometry

Packages for common geometric calculations including the ROS transform library, "tf". Also includes ROS bindings for "bullet" physics engine and "kdl" kinematics/dynamics package.
173 stars 274 forks source link

TypeError: string pattern on a bytes-like object #193

Closed kindofausername closed 3 years ago

kindofausername commented 4 years ago

Wanted to use

$ rosrun tf view_frames

Listening to /tf for 5.0 seconds Done Listening b'dot - graphviz version 2.40.1 (20161225.0304)\n' Traceback (most recent call last): File "/opt/ros/melodic/lib/tf/view_frames", line 119, in 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

Simply adding the .decode('utf-8') to m = r.search(vstr.decode('utf-8')) fixed it.

andersdu commented 3 years ago

saved my day!

ymollard commented 3 years ago

You may prefer tf2 since tf is now deprecated: rosrun tf2_tools view_frames.py which requires sudo apt install ros-noetic-tf2-tools first.

But anyway, tf is still there, could anyone merge this, please? Maybe @tfoote? Maybe rebased into noetic-devel though, since only Noetic is running with py3 by default.

acarrillo commented 3 years ago

You may prefer tf2 since tf is now deprecated: roslaunch tf2_tools view_frames.py which requires sudo apt install ros-noetic-tf2-tools first.

Very minor: that suggestion should be rosrun instead of roslaunch, like rosrun tf2_tools view_frames.py.

And +1 for targeting noetic, much agreed!

MichaelGrupp commented 3 years ago

I opened a similar PR - this whole code block is useless nowadays, so the problem can be also resolved by removing the check: #222

lucbettaieb commented 3 years ago

@tfoote +1 <3

lucbettaieb commented 3 years ago

+1 @mikeferguson maybe?

tfoote commented 3 years ago

Replaced by #222

Esmaeel-Hilal commented 2 years ago

Thank you, you saved me

Nassef10 commented 1 year ago

how can i edit this file ? it refuses to be edited, it is secured !