29 #include <pcl/io/pcd_io.h>
30 #include <pcl/registration/icp.h>
31 #include <pcl/visualization/cloud_viewer.h>
33 #include <pcl/common/transforms.h>
34 #include <VirtualRobot/MathTools.h>
36 #include <pcl/filters/approximate_voxel_grid.h>
50 defineRequiredProperty<std::string>(
"PointCloud1",
"FileName1");
51 defineOptionalProperty<std::string>(
"PointCloud2",
"",
"FileName2");
52 defineOptionalProperty<bool>(
"Merge",
true,
"If set the program merges PointCloud1 and PointCloud2");
53 defineOptionalProperty<bool>(
"Transform",
true,
"If set the program transforms the merged Pointcloud or Pointcloud1");
54 defineOptionalProperty<bool>(
"Show",
true,
"If set the program shows the merged/transformed Pointcloud or Pointcloud1");
55 defineOptionalProperty<std::string>(
"ResultFileName",
"result.pcd",
"The filename of the output file");
56 defineOptionalProperty<float>(
"X", 0.0,
"");
57 defineOptionalProperty<float>(
"Y", 0.0,
"");
58 defineOptionalProperty<float>(
"Z", 0.0,
"");
59 defineOptionalProperty<float>(
"Roll", 0.0,
"");
60 defineOptionalProperty<float>(
"Pitch", 0.0,
"");
61 defineOptionalProperty<float>(
"Yaw", 0.0,
"");
86 return "PointCloudUtility";
89 void fusePointclouds(std::string file1, std::string file2, std::string out);
90 pcl::PointCloud<pcl::PointXYZRGBA>::Ptr loadPointCloud(std::string
filename);
91 void moveOrigin(std::string file, std::string out, Eigen::Vector3f translation);
92 void rotatePointCloud(std::string file, std::string out,
Eigen::Matrix3f rotation);
93 void transformPointcloud(std::string file, std::string out,
Eigen::Matrix4f pose);
94 void showResult(std::string file);