Template Function voxblox::io::convertVoxelGridToPointCloud(const Layer<VoxelType>&, const float, const float, voxblox::Mesh *)

Function Documentation

template <typename VoxelType>
bool voxblox::io::convertVoxelGridToPointCloud(const Layer<VoxelType> &layer, const float sdf_color_range, const float sdf_max_value, voxblox::Mesh *point_cloud)

This function converts all voxels with positive weight/observed into points colored by a color map based on the SDF value.

The parameter sdf_color_range is used to determine the range of the rainbow color map which is used to visualize the SDF values. If an SDF value is outside this range, it will be truncated to the limits of the range. sdf_max_value determines if a point is generated for this value or not. Only SDF values within this max value result in a colored point. If this threshold is set to a negative value, all points will be generated independent of the SDF value.