20 #include "leica_scanstation_utils/LeicaUtils.h" 23 #include <gtest/gtest.h> 41 std::string
f = pkg_path +
"/test/cube.ply";
43 int sample_points = 5000;
55 ASSERT_EQ(tf, Eigen::Matrix4f::Identity());
65 double tolerance = 1e-3;
71 catch(std::exception& e)
73 ADD_FAILURE()<< e.what();
82 ASSERT_EQ(tf, Eigen::Matrix4f::Identity());
100 catch(std::exception& e)
102 ADD_FAILURE()<< e.what();
111 ASSERT_EQ(tf, Eigen::Matrix4f::Identity());
117 gicp_alignment.
run();
127 catch(std::exception& e)
129 ADD_FAILURE()<< e.what();
134 int main(
int argc,
char **argv){
135 testing::InitGoogleTest(&argc, argv);
137 return RUN_ALL_TESTS();
pcl::PointCloud< pcl::PointXYZRGB > PointCloudRGB
PointCloudRGB::Ptr targetRGB
void run()
Perform GICP alignment.
Perform a fine alignment from source to target cloud with Generalized Iterative Closest Point...
void iterate()
Do more iterations of GICP alignment.
void applyTFtoCloud(PointCloudRGB::Ptr cloud)
Once GICP is finished, apply fine transformation to source cloud.
void setTfEpsilon(double tf_epsilon)
Set the Tf Epsilon object.
void cubePointCloud(PointCloudRGB::Ptr cloud)
int main(int argc, char **argv)
PointCloudRGB::Ptr sourceRGB
This class is used to obtain pcl::PointCloud from CAD file. Supported formats: .OBJ.
TEST_F(TestGICPAlignment, testApplyTF)
void getAlignedCloud(PointCloudRGB::Ptr aligned_cloud)
Get the aligned cloud object.
ROSLIB_DECL std::string getPath(const std::string &package_name)
bool transform_exists_
If true, fine transformation is finished.
void convertCloud(PointCloudRGB::Ptr cloud)
convert cloud defined by path in construstor into cloud
void setRANSACOutlierTh(int ransac_threshold)
Set the RANSAC Outlier threshold.
void setMaxCorrespondenceDistance(int max_corresp_distance)
Set the Max Correspondence Distance object.
void setMaxIterations(int iterations)
Set the Max Iterations object.
static void rotateCloud(PointCloudRGB::Ptr cloud_in, PointCloudRGB::Ptr cloud_out, double roll, double pitch, double yaw)
Apply rotation to cloud. Values given in [rad].
Eigen::Matrix4f getFineTransform()
Get the fine transform object.