ros-industrial-attic / yak_ros

Example ROS frontend node for the Yak TSDF package
Apache License 2.0
48 stars 22 forks source link

Input point cloud has no data! upon calling mesh generation service #24

Closed gavanderhoorn closed 4 years ago

gavanderhoorn commented 4 years ago

Summarising here (from private email): current implementation of yak doesn't appear to support depth images with TYPE_32FC1 encoding (ie: floats encoding metres), but only TYPE_16UC1 (ie: integers encoding millimetres).

Everything seems to work, but no fusion takes place and trying to serialise the current state of yak to a mesh (by calling the generate_mesh service) results in:

[ INFO] : Beginning marching cubes meshing
[ INFO] : Meshing done, saving ply as
[pcl::io::savePLYFile] Input point cloud has no data!
[ INFO] : Saving done 

Context:

gavanderhoorn commented 4 years ago

According to @schornakj this is a know issue with yak.

Reason I'm posting here is that a work-around when using yak with yak_ros (via the demo nodes included here) would be:

  1. use pointclouds instead of depth images (the callback converts the PointCloud2 to a depth image with the correct encoding here), or
  2. use the convert_metric nodelet to convert from (TYPE_32FC1, metres) to (TYPE_16UC1, millimetres) (the wiki page only mentions mm->m conversion, but the code actually supports m->mm as well

(ie: work-around on the ROS side of the yak integration)

gavanderhoorn commented 4 years ago

Just wanted to log this here, but as it's not an issue here (the problem is in yak according to @schornakj), closing this.

gavanderhoorn commented 4 years ago

@dave992 and @IKapitaniuk FYI.