ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

self.bridge.imgmsg_to_cv2(data, "32FC1") is correct if the source image encoding is 32FC1, the nans are pixels where there was no depth data (which there could be a lot of depending on the sensor and what it is pointed at), you need to skip past those or make up a number like 0.0 to use in place of a legitimate value at that location if downstream processing can't handle nans. rqt_image_view shows the nan values as black.