15 #include <mrpt/poses/Lie/SE.h>
19 using namespace mrpt::poses::Lie;
32 pp.global = {1, 0, 0};
33 pp.local = groundTruth.inverseComposePoint(pp.global);
36 auto& pp = p.paired_pt2pt.emplace_back();
37 pp.global = {0, 1, 0};
38 pp.local = groundTruth.inverseComposePoint(pp.global);
41 auto& pp = p.paired_pt2pt.emplace_back();
42 pp.global = {0, 0, 1};
43 pp.local = groundTruth.inverseComposePoint(pp.global);
46 std::cout <<
"Input pairings: " << p.contents_summary() << std::endl;
51 mrpt::containers::yaml solverParams;
52 solverParams[
"maxIterations"] = 25;
53 solverParams[
"innerLoopVerbose"] =
true;
57 for (
int Case = 0; Case < 3; Case++)
63 auto& prior = sc.
prior.emplace();
64 prior.mean = mrpt::poses::CPose3D::FromXYZYawPitchRoll(
65 2.0, 3.0, 4.0, 10.0_deg, 10.0_deg, 10.0_deg);
66 prior.cov_inv.fill(0);
68 mrpt::poses::CPose3D expected;
69 std::function<void(
void)> checkFn;
75 expected = groundTruth;
78 mrpt::poses::Lie::SE<3>::log(
85 expected = prior.mean;
86 for (
int i = 0; i < 3; i++) prior.cov_inv(i, i) = 100.0;
88 for (
int i = 0; i < 3; i++)
94 expected = prior.mean;
95 for (
int i = 3; i < 6; i++) prior.cov_inv(i, i) = 100.0;
97 for (
int i = 3; i < 6; i++)
106 std::cout <<
"Case:" << Case <<
"\n"
109 std::cout <<
"Expected optimalPose: " << expected << std::endl;
120 int main([[maybe_unused]]
int argc, [[maybe_unused]]
char** argv)
122 using mrpt::poses::CPose3D;
123 using namespace mrpt;
128 1.0, 2.0, 3.0, 5.0_deg, 15.0_deg, 20.0_deg));
130 catch (std::exception& e)
132 std::cerr << mrpt::exception_to_str(e) <<
"\n";