ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
self.bridge.imgmsg_to_cv2(data, "32FC1")
is correct if the source image encoding is 32FC1, the nan
s 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.