28 #include <pcl/common/transforms.h>
29 #include <pcl/filters/approximate_voxel_grid.h>
30 #include <pcl/io/pcd_io.h>
31 #include <pcl/registration/icp.h>
32 #include <pcl/visualization/cloud_viewer.h>
34 #include <VirtualRobot/MathTools.h>
52 defineRequiredProperty<std::string>(
"PointCloud1",
"FileName1");
53 defineOptionalProperty<std::string>(
"PointCloud2",
"",
"FileName2");
54 defineOptionalProperty<bool>(
55 "Merge",
true,
"If set the program merges PointCloud1 and PointCloud2");
56 defineOptionalProperty<bool>(
59 "If set the program transforms the merged Pointcloud or Pointcloud1");
60 defineOptionalProperty<bool>(
63 "If set the program shows the merged/transformed Pointcloud or Pointcloud1");
64 defineOptionalProperty<std::string>(
65 "ResultFileName",
"result.pcd",
"The filename of the output file");
66 defineOptionalProperty<float>(
"X", 0.0,
"");
67 defineOptionalProperty<float>(
"Y", 0.0,
"");
68 defineOptionalProperty<float>(
"Z", 0.0,
"");
69 defineOptionalProperty<float>(
"Roll", 0.0,
"");
70 defineOptionalProperty<float>(
"Pitch", 0.0,
"");
71 defineOptionalProperty<float>(
"Yaw", 0.0,
"");
95 return "PointCloudUtility";
99 void fusePointclouds(std::string file1, std::string file2, std::string out);
100 pcl::PointCloud<pcl::PointXYZRGBA>::Ptr loadPointCloud(std::string
filename);
101 void moveOrigin(std::string file, std::string out, Eigen::Vector3f translation);
102 void rotatePointCloud(std::string file, std::string out,
Eigen::Matrix3f rotation);
103 void transformPointcloud(std::string file, std::string out,
Eigen::Matrix4f pose);
104 void showResult(std::string file);