Go to the documentation of this file.
31 using namespace gtsam;
37 const auto [inputGraph, posesInFile] =
readG2o(g2oFile, is3D);
39 auto priorModel = noiseModel::Unit::Create(3);
40 inputGraph->addPrior(0, posesInFile->at<
Pose2>(0), priorModel);
42 auto poseGraph = initialize::buildPoseGraph<Pose2>(*inputGraph);
46 for (
size_t i : {0, 1, 2, 3})
48 const Values poses = initialize::computePoses<Pose2>(orientations, &poseGraph);
58 const auto [inputGraph, posesInFile] =
readG2o(g2oFile, is3D);
60 auto priorModel = noiseModel::Unit::Create(6);
61 inputGraph->addPrior(0, posesInFile->at<
Pose3>(0), priorModel);
63 auto poseGraph = initialize::buildPoseGraph<Pose3>(*inputGraph);
67 for (
size_t i : {0, 1, 2})
69 Values poses = initialize::computePoses<Pose3>(orientations, &poseGraph);
common code between lago.* (2D) and InitializePose3.* (3D)
static int runAllTests(TestResult &result)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EXPECT(condition)
const Rot2 & rotation(OptionalJacobian< 1, 3 > Hself={}) const
rotation
GraphAndValues readG2o(const std::string &g2oFile, const bool is3D, KernelFunctionType kernelFunctionType)
This function parses a g2o file and stores the measurements into a NonlinearFactorGraph and the initi...
GenericValue< T > genericValue(const T &v)
utility functions for loading datasets
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself={}) const
get rotation
void insert(Key j, const Value &val)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
GTSAM_EXPORT std::string findExampleDataFile(const std::string &name)
TEST(InitializePose3, computePoses2D)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:40