ros-perception / image_transport_plugins

A set of plugins for publishing and subscribing to sensor_msgs/Image topics in representations other than raw pixel data.
BSD 3-Clause "New" or "Revised" License
58 stars 119 forks source link

Depth image decompression resulting in all NaN values. #89

Open abstanton opened 2 years ago

abstanton commented 2 years ago

Hi, we are facing an issue where on decompression of a 32FC1 depth image compressed with the compressedDepth plugin, every pixel is NaN. A bag file including a few depth messages before compression can be found here . Has anyone faced a similar problem/have a possible solution? This is really hindering our ability to record/review data at the moment so any help would be very appreciated.

Steps to reproduce:

  1. Run bag file with qos override for camera/depth/depth_registered topic to system default
  2. Run ros2 run image_transport republish raw compressedDepth --ros-args --remap /in:=/camera/depth/depth_registered --remap /out/compressedDepth:=/camera/depth/depth_registered/compressedDepth
  3. Run ros2 run image_transport republish compressedDepth raw --ros-args --remap /in/compressedDepth:=/camera/depth/depth_registered/compressedDepth --remap /out:=/camera/depth/depth
  4. Try and visualise the /camera/depth/depth topic, it will be all NaN so will show as a black image, whereas visualising /camera/depth/depth_registered will show a normal depth image.
siliconlad commented 2 years ago

This is happening to us on ROS 2 Galactic on Ubuntu 20.04.

jonselling commented 7 months ago

It seems like it was (correctly) fixed in the PR for rolling, can we make an update to humble that just updates this line to use the correct config field?

bmegli commented 6 months ago

Apart from development rolling, the fix is released in Iron

https://github.com/ros-perception/image_transport_plugins/blob/f7898e5896bd67c1284e654954b883bd74f33297/compressed_depth_image_transport/src/compressed_depth_publisher.cpp#L67-L68


I agree that at least this minimal fix is necessary to make humble compression functional.

Mentioning maintainers may capture their attention, @ijnek

ijnek commented 6 months ago

Yes! A PR woulld be greatly appreciated for this bug fix.

mhubii commented 3 months ago

what is the state of this? I was unfortunately relying on compressed depth functionality with no time for a check.

I am also receiving this error: https://github.com/ros-perception/image_transport_plugins/pull/106#issuecomment-2186239856

Running Ubuntu 22.04 ROS 2 Humble

Update: I built this package from source and depth compression works well. Maybe a new binary release is necessary?