photoneo / phoxi_camera

ROS Package for PhoXi Scanner/Camera. If you like us, STAR US! :P
MIT License
44 stars 32 forks source link

Added publishing of point clouds with color information. #21

Closed carlosmccosta closed 4 years ago

carlosmccosta commented 5 years ago

Added publishing of point clouds with color information retrieved from the intensity texture with support for automatically computing the min and max intensity for equalizing the range (or using a specified range in the dynamic reconfigure configuration).

carlosmccosta commented 5 years ago

All the pull requests submitted previously can be tested in this branch: https://github.com/carlosmccosta/phoxi_camera/tree/master-all-pr

carlosmccosta commented 5 years ago

For testing this PR be aware that the PR below fixed an issue that caused the flag of [config.send_deapth_map] to change [scanner->OutputSettings->SendTexture] instead of [scanner->OutputSettings->SendDepthMap]: https://github.com/photoneo/phoxi_camera/pull/20/files#diff-dd36b44b223cf7e334011e5e93c64445L473 As such, without the PR above, for receiving the texture it is also necessary to enable SendDepthMap.

carlosmccosta commented 5 years ago

Added a new commit for allowing the publish of sparse or dense point clouds (I did not create a new PR since this commit builds upon the commits of this PR). Some users may need dense point clouds when using algorithms that take advantage of the 2D image structure. However, in some use cases, only valid 3D data is needed, and as such, publishing sparse point clouds can significantly lower the number of bytes sent over the tcp ros topic (for example, in the 2 examples that come with the SDK, the reduction was around 40%). This in turn reduces the time it takes to send the data from the driver to the processing nodes.

I also changed the published point cloud to follow the conventions and have the invalid points with nan coordinates (previously they had coordinates 0,0,0) Now pcl::removeNaNFromPointCloud works as expected.