25 using namespace gtsam;
34 return Unit3(Tb - Ta);
57 poses, {{0, 1}, {0, 2}, {1, 2}});
60 for (
auto& unitTranslation : relativeTranslations) {
62 unitTranslation.measured()));
70 const double scale = 2.0;
101 auto relativeTranslations =
105 for (
auto& unitTranslation : relativeTranslations) {
107 unitTranslation.measured()));
115 const auto result = algorithm.
run(relativeTranslations, 3.0);
140 poses, {{0, 1}, {1, 3}, {3, 0}});
143 for (
auto& unitTranslation : relativeTranslations) {
145 unitTranslation.measured()));
152 const auto result = algorithm.
run(relativeTranslations, 3.0);
174 auto relativeTranslations =
178 for (
auto& unitTranslation : relativeTranslations) {
180 unitTranslation.measured()));
185 const auto result = algorithm.
run(relativeTranslations, 3.0);
213 poses, {{0, 1}, {1, 2}, {1, 3}, {3, 0}});
216 for (
auto& unitTranslation : relativeTranslations) {
218 unitTranslation.measured()));
224 const auto result = algorithm.
run(relativeTranslations, 4.0);
240 poses, {{0, 1}, {1, 2}, {2, 0}});
243 for (
auto& unitTranslation : relativeTranslations) {
245 unitTranslation.measured()));
251 const auto result = algorithm.
run(relativeTranslations, 4.0);
277 poses, {{0, 1}, {0, 3}, {1, 3}});
279 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
280 betweenTranslations.emplace_back(0, 3,
Point3(1, -1, 0),
281 noiseModel::Isotropic::Sigma(3, 1
e-2));
285 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);
311 poses, {{0, 1}, {0, 3}, {1, 3}});
313 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
314 betweenTranslations.emplace_back(0, 1,
Point3(2, 0, 0),
315 noiseModel::Constrained::All(3, 1e2));
319 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);
337 poses, {{0, 1}, {0, 3}, {1, 3}});
339 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
340 betweenTranslations.emplace_back(0, 1,
Point3(2, 0, 0),
341 noiseModel::Constrained::All(3, 1e2));
343 betweenTranslations.emplace_back(0, 4,
Point3(1, 2, 1));
347 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);
381 poses, {{0, 1}, {0, 2}, {1, 2}});
384 for (
auto& unitTranslation : relativeTranslations) {
386 unitTranslation.measured()));
395 const double scale = 2.0;
426 auto relativeTranslations =
430 for (
auto& unitTranslation : relativeTranslations) {
432 unitTranslation.measured()));
441 const auto result = algorithm.
run(relativeTranslations, 3.0);
466 poses, {{0, 1}, {1, 3}, {3, 0}});
469 for (
auto& unitTranslation : relativeTranslations) {
471 unitTranslation.measured()));
479 const auto result = algorithm.
run(relativeTranslations, 3.0);
501 auto relativeTranslations =
505 for (
auto& unitTranslation : relativeTranslations) {
507 unitTranslation.measured()));
513 const auto result = algorithm.
run(relativeTranslations, 3.0);
541 poses, {{0, 1}, {1, 2}, {1, 3}, {3, 0}});
544 for (
auto& unitTranslation : relativeTranslations) {
546 unitTranslation.measured()));
553 const auto result = algorithm.
run(relativeTranslations, 4.0);
569 poses, {{0, 1}, {1, 2}, {2, 0}});
572 for (
auto& unitTranslation : relativeTranslations) {
574 unitTranslation.measured()));
580 const auto result = algorithm.
run(relativeTranslations, 4.0);
606 poses, {{0, 1}, {0, 3}, {1, 3}});
608 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
609 betweenTranslations.emplace_back(0, 3,
Point3(1, -1, 0),
610 noiseModel::Isotropic::Sigma(3, 1
e-2));
615 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);
641 poses, {{0, 1}, {0, 3}, {1, 3}});
643 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
644 betweenTranslations.emplace_back(0, 1,
Point3(2, 0, 0),
645 noiseModel::Constrained::All(3, 1e2));
650 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);
668 poses, {{0, 1}, {0, 3}, {1, 3}});
670 std::vector<BinaryMeasurement<Point3>> betweenTranslations;
671 betweenTranslations.emplace_back(0, 1,
Point3(2, 0, 0),
672 noiseModel::Constrained::All(3, 1e2));
674 betweenTranslations.emplace_back(0, 4,
Point3(1, 2, 1));
679 algorithm.
run(relativeTranslations, 0.0, betweenTranslations);