这篇文章记录几个在测试代码时候遇到的问题,主要对比不同库在代码的书写和使用上的区别,这里标明pcl库的版本号:
1.6:
pcl::octree ::compression_Profiles_e compressionProfile = pcl::octree ::MED_RES_ONLINE_COMPRESSION_WITHOUT_COLOR;
1.8:
pcl::io::compression_Profiles_e compressionProfile = pcl::io::MED_RES_ONLINE_COMPRESSION_WITHOUT_COLOR;
//该代码行为定义压缩文件的属性
1.6:
pcl::octree::PointCloudCompression <pointT>* PointCloudEncoder;
PointCloudEncoder = new pcl::io::OctreePointCloudCompression<pointT>(compressionProfile, ture);
1.8:
pcl::io::OctreePointCloudCompression<pointT>::Ptr PointCloudEncoder(new pcl::io::OctreePointCloudCompression<pointT>(compressionProfile, true, 0.002));
//该代码行为定义八叉树算法压缩器,解压器同理
1.5:
pcl::PointCloud2::Ptr cloud (new pcl::PointCloud2 ());
1.8:
sensor_msgs::PointCloud2::Ptr cloud (new sensor_msgs::PointCloud2 ());
//该代码为定义点类型指针