Replace functions to save point cloud from pcl::io with SaveCloudToFile function, which firstly set the height and width property of the point cloud, and then save it.
This is to avoid the "No points to read" issue when using pcl_viewer to load the saved pcd file. See #75 for details.
Since pcl_map_viewer.h includes the point_cloud_utils.h file, and the pcl_map_viewer.h is included by several source files in ch7, including direct_ndt_lo.h, incremental_ndt_lo.h and loam_like_odom.h, create a point_cloud_utils.cc file and move the definitions to it to avoid "multiple definition" compile errors.
Replace functions to save point cloud from
pcl::io
withSaveCloudToFile
function, which firstly set the height and width property of the point cloud, and then save it.This is to avoid the "No points to read" issue when using
pcl_viewer
to load the saved pcd file. See #75 for details.Since
pcl_map_viewer.h
includes thepoint_cloud_utils.h
file, and thepcl_map_viewer.h
is included by several source files in ch7, includingdirect_ndt_lo.h
,incremental_ndt_lo.h
andloam_like_odom.h
, create apoint_cloud_utils.cc
file and move the definitions to it to avoid "multiple definition" compile errors.