message: pointcloud_to_depthimage: Handling the case of empty input cloud to avoid an assert
diff: @@ -200,6 +200,14 @@ private:
  pcl_conversions::toPCL(*pointCloud2Msg, *cloud);
  cv_bridge::CvImage depthImage;
  +
  + if(cloud->data.empty())
  + {
  + ROS_WARN("Received an empty cloud on topic \"%s\"! A depth image with all zeros is returned.", pointCloudSub_.getTopic().c_str());
  + depthImage.image = cv::Mat::zeros(model.imageSize(), CV_32FC1);
  + }
  + else
  + {
  depthImage.image = rtabmap::util3d::projectCloudToCamera(model.imageSize(), model.K(), cloud, model.localTransform());
  if(fillHolesSize_ > 0 && fillIterations_ > 0)
  @@ -209,6 +217,7 @@ private:
  depthImage.image = rtabmap::util2d::fillDepthHoles(depthImage.image, fillHolesSize_, fillHolesError_);
  }
  }
  + }
  depthImage.header = cameraInfoMsg->header;
  