PCD地图转换
为了得到合适的地图(与GNSS数据融合、地图拼接等),有时需要对生成的三维地图进行转换:平移、翻转等等 void transform_(const std::string& pcd_path) { Eigen::Matrix4d transformation_; Eigen::Matrix4d trans; Eigen::Vector3d v1(axis_x1,axis_y1,axis_z1); Eigen::Vector3d v2(axis_x2,axis_y2,axis_z2); double angle = M_PI*(axis_angle/180.0); rotate_arbitrary_line(trans,v1,v2,angle); transformation_ = trans.transpose(); Eigen::Matrix4d transform_1 = Eigen::Matrix4d::Identity(); transform_1 (0,3) = t_x; transform_1 (1,3) = t_y; transform_1 (2,3) = t_z; transformation_ = transformation_*transform_1; pcl::PointCloud<pcl::PointXYZ>::Ptr source_cloud (new