Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompressedImage thumbnails not displayed in Noetic #74

Open
mabelzhang opened this issue Oct 27, 2020 · 1 comment
Open

CompressedImage thumbnails not displayed in Noetic #74

mabelzhang opened this issue Oct 27, 2020 · 1 comment
Labels

Comments

@mabelzhang
Copy link

mabelzhang commented Oct 27, 2020

The error is printed from a call to rqt_bag_plugins.image_helper.imgmsg_to_pil, but I don't know if the cause is in this package or somewhere deeper in the actual image conversion, because I see different behavior in Melodic and Noetic while compiling from the same commit hash.

Version: commit hash 3beb083
Platforms: Ubuntu 18.04 + Melodic vs. Ubuntu 20.04 + Noetic

To reproduce:
In rqt_bag, load a rosbag containing message type sensor_msgs/CompressedImage. Toggle thumbnail on.

In Melodic, image thumbnails are displayed. No messages are printed in the terminal.

In Noetic, no image thumbnails are displayed. These messages are printed in the terminal

Can't convert image: initial_value must be str or None, not bytes
Disabling renderer on /camera/color/image_raw/compressed

That topic is a sensor_msgs/CompressedImage.

@mjeronimo
Copy link
Contributor

I've tried the provided bag file with Kinetic, Melodic, and Noetic and the image_helper patch works for all of them. The thumbnail shows correctly as well as the images when using the Image View plugin.

Without this PR, rqt_bag fails on all three distributions with the following messages:

  • Kinetic - fails with "Can't convert image: local variable 'pil_mode' referenced before assignment
  • Melodic - fails with "Can't convert image: local variable 'pil_mode' referenced before assignment
  • Noetic - fails with "Can't convert image: initial_value must be str or None, not bytes

To test, I did the following:

(All console windows source /opt/ros/<distribution>/setup.bash in the .bashrc)

  1. In one console window, start roscore

// Try the distribution's rqt_bag
2. Open a console window
3. Run rqt_bag
4. Open the images_compressed.bag file
5. Select Thubnail. No thumbnails are displayed and there is an error message in the console window
6. Select View|Image and select the Next button on the image plugin. No images are displayed and an error message is displayed in the console window

// Try the latest rqt_bag
7. Open another console window
8. Build the 'master' branch of latest rqt_bag source code (I used colcon)
9. Source rqt_bag/install/local_setup.bash
10. Run rqt_bag (the newly built one which will be available after sourcing local_setup.bash. You can confirm with "which rqt_bag")
11. Repeat steps 3-6 above. This time thumbnails and images are displayed correctly and there are no error messages

The above is true for all of Kinetic, Melodic, and Noetic. Please let me know if you get a different result following these steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants