ros-perception / perception_pcl

PCL (Point Cloud Library) ROS interface stack
http://wiki.ros.org/perception_pcl
425 stars 334 forks source link

No header (frame_id) is set for the sensor_msgs::Image output of 'toROSMsg' #304

Open sayali-purdue opened 4 years ago

sayali-purdue commented 4 years ago

There are three toROSMsg functions, converting input to sensor_msgs::Image output, in pcl_conversions.h

All these functions do not assign the header of the sensor_msgs::Image output variable unlike other conversion functions that convert to sensor_msgs::PointCloud2 in this file:

  1. toROSMsg at line #506: does conversion of the data, but does not assign the header of the output.
  2. toROSMsg at lines #486, #496: depend on pcl::toPCLPointCloud2 function of pcl library. This library function too does not set their output variable's header.

Would really appreciate if you can explain why the header (frame_id) of the image is not set? Should the frame of the output image be same as the input point cloud?

Thank you!

SteveMacenski commented 4 years ago

Probably an oversight, a PR to fix would be appreciated.

mvieth commented 3 years ago

The linked pull request is a partial fix for the problem (more specifically, for the second point).