16 #include <mrpt/poses/Lie/SE.h>
21 using namespace mrpt::poses::Lie;
34 mrpt::math::TPlane::FromPointAndNormal({0, 0, 0}, {0, 0, 1}),
36 pp.pt_local = groundTruth.inverseComposePoint({0.5, 0, 0});
39 auto& pp = p.paired_pt2pl.emplace_back();
41 mrpt::math::TPlane::FromPointAndNormal({0, 0, 0}, {1, 0, 0}),
43 pp.pt_local = groundTruth.inverseComposePoint({0, 0.8, 0});
46 auto& pp = p.paired_pt2pl.emplace_back();
48 mrpt::math::TPlane::FromPointAndNormal({0, 0, 0}, {0, 1, 0}),
50 pp.pt_local = groundTruth.inverseComposePoint({0, 0, 0.3});
53 auto& pp = p.paired_pt2pt.emplace_back();
54 pp.global = {0, 0, 0};
55 const auto loc = groundTruth.inverseComposePoint({0, 0, 0});
59 std::cout <<
"Input pairings: " << p.contents_summary() << std::endl;
69 std::cout <<
"Found optimalPose: " << result.
optimalPose << std::endl;
70 std::cout <<
"Expected optimalPose: " << groundTruth << std::endl;
75 mrpt::poses::Lie::SE<3>::log(result.
optimalPose - groundTruth).norm(),
83 using mrpt::poses::CPose3D;
89 mrpt::containers::yaml solverParams;
90 solverParams[
"maxIterations"] = 25;
96 const std::vector<const mp2p_icp::Solver*> solvers = {
101 for (
const auto solverPtr : solvers)
103 const auto& solver = *solverPtr;
105 <<
"Using solver: " << solver.GetRuntimeClass()->className
107 "=========================================================\n";
120 CPose3D::FromYawPitchRoll(20.0_deg, 0.0_deg, 0.0_deg), solver);
122 CPose3D::FromYawPitchRoll(-20.0_deg, 0.0_deg, 0.0_deg), solver);
125 CPose3D::FromYawPitchRoll(0.0_deg, 10.0_deg, 0.0_deg), solver);
127 CPose3D::FromYawPitchRoll(0.0_deg, -10.0_deg, 0.0_deg), solver);
130 CPose3D::FromYawPitchRoll(0.0_deg, 0.0_deg, 15.0_deg), solver);
132 CPose3D::FromYawPitchRoll(0.0_deg, 0.0_deg, -15.0_deg), solver);
136 CPose3D::FromXYZYawPitchRoll(
137 1.0, 2.0, 3.0, -10.0_deg, 5.0_deg, 30.0_deg),
142 int main([[maybe_unused]]
int argc, [[maybe_unused]]
char** argv)
148 catch (std::exception& e)
150 std::cerr << mrpt::exception_to_str(e) <<
"\n";