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.
172 stars 274 forks source link

tf view_frames is broken #201

Closed Windfisch closed 2 years ago

Windfisch commented 4 years ago

Hi,

on ROS melodic running on Arch Linux, rosrun tf view_frames does not work for me. I'm getting this output:

$ 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

By manually patching in the changes from #193, I can resolve this. It would be good to merge that pull request.

xmuller commented 4 years ago

Up ! It would be nice to also merge #193 on ROS noetic. We have got the same error on Ubuntu 20.04.

ana-GT commented 4 years ago

Agreed, please merge #193. Tested in Ubuntu 20.04 noetic and the patch works (had to change python to python3 but that is specific to my setup).

nilsbore commented 3 years ago

Another +1 for merging https://github.com/ros/geometry/pull/193, tested on noetic.

lauralindzey commented 3 years ago

Big +1 / bump. I also tested #193's fix on noetic, and it worked for me.

I think my setup is pretty bog-standard (Ubuntu 20.04, ros-noetic-desktop-full), and find it surprising that a core ROS debugging tool doesn't work out of the box.

djordjevujic commented 3 years ago

Another +1 after taking changes from #193 (Ubuntu 20.04, ros-noetic-desktop-full)

Windfisch commented 3 years ago

@tfoote, can maybe you merge #193 so this issue can be closed? It seems well tested now.

tfoote commented 3 years ago

193 isn't dual compatible python 2 and python3 so it couldn't be merged into melodic. But a rebase of it can be merged into noetic now that python3 is required for noetic.

tfoote commented 3 years ago

I think my setup is pretty bog-standard (Ubuntu 20.04, ros-noetic-desktop-full), and find it surprising that a core ROS debugging tool doesn't work out of the box.

This tool has been deprecated and it's recommended to use tf2_tools view_frames.py which is why this has received less attention.

lauralindzey commented 3 years ago

This tool has been deprecated and it's recommended to use tf2_tools view_frames.py which is why this has received less attention.

Ah, I'd been aware of tf2/tf, but didn't realize that the tf utilities weren't just wrappers around the tf2 equivalents, and that I actually needed to type a few more characters =)

Do you want a PR that adds a deprecation note to the output of tf's view_frames?

tfoote commented 3 years ago

That would be great.

JDuchniewicz commented 3 years ago

The wiki should be updated to point to tf2_tools package. Otherwise the user could be confused.

ckurtz22 commented 3 years ago

I think my setup is pretty bog-standard (Ubuntu 20.04, ros-noetic-desktop-full), and find it surprising that a core ROS debugging tool doesn't work out of the box.

This tool has been deprecated and it's recommended to use tf2_tools view_frames.py which is why this has received less attention.

I think a reason this fix should be merged is because it is still used in rqt, so the TF frame viewer in rqt is broken.

acarrillo commented 3 years ago

I am systematically onboarding my team from kinetic to noetic and we are all very accustomed to the old viewer as part of our regular workflow; we are happy to use the new tf2_tools provided script, and I think a deprecation warning is a great idea, but leaving it straight out broken will leave a lot of newcomers to noetic feeling unsure if the new platform is ready for them yet :face_with_head_bandage: . As has been noted here, rosrun tf view_frames is very famous among ROS beginners and regulars alike :)

If we don't want to fix it, I would think we should just outright delete it + replace it with a script that does nothing but print that deprecation warning, (or heck, alias under the hood to the tf2_tools one if it can be found?), but even that is quite severe.

MichaelGrupp commented 3 years ago

Just saw this issue after opening my PR #222 with a fix, but I agree with @acarrillo that a deprecation warning plus a fix would be a good solution. It's an old habit to use this tool :older_adult:

acarrillo commented 3 years ago

Indeed, I am still googling for this ticket all the time to recall what the deprecation alternative is!

Petrox commented 3 years ago
         at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/tf/view_frames", line 119, in <module>
    generate(dot_graph)
  File "/opt/ros/noetic/lib/tf/view_frames", line 89, in generate
    m = r.search(vstr)
TypeError: cannot use a string pattern on a bytes-like object
lucbettaieb commented 3 years ago

Yep

luc@p15 ~ $ rosrun tf view_frames 
Listening to /tf for 5.0 seconds
Done Listening
b'dot - graphviz version 2.43.0 (0)\n'
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/tf/view_frames", line 119, in <module>
    generate(dot_graph)
  File "/opt/ros/noetic/lib/tf/view_frames", line 89, in generate
    m = r.search(vstr)
TypeError: cannot use a string pattern on a bytes-like object

R I P

lucbettaieb commented 3 years ago

This tool has been deprecated and it's recommended to use tf2_tools view_frames.py which is why this has received less attention. @tfoote

If we're really trying to deprecate the use of these tf utilities -- is it EOL'd? When will it stop being released with new versions of ROS1?

It may also be worthwhile changing the base install of *-desktop-full to include tf2_tools

EnricoMingo commented 3 years ago

Hi all, I just came up as well into this issue. Just as info, a simple workaround I did was to add the following line just before m = r.search(vstr): vstr = vstr.decode('ISO-8859-1')

tkazik commented 2 years ago

The wikis are unfortunately still quite full of these old tf commands. tf2 has been introduced quite some years ago now and it would be great if the wikis were updated accordingly. Anyway, this command works for me under noetic:

rosrun tf2_tools view_frames.py

PS: https://github.com/ros/geometry/pull/222 seems to be merged now.

JeffXiesk commented 2 years ago

Hi, I just solved this from this website https://blog.csdn.net/Daminate/article/details/115270670

Open the source file by this sudo gedit /opt/ros/noetic/lib/tf/view_frames

Add this "vstr=str(vstr)" before "m = r.search(vstr)" to make vstr convert to a string and that's ooook!! vstr=str(vstr) m = r.search(vstr)

tfoote commented 2 years ago

This was resolved by #222