27 using namespace gtsam;
30 std::random_device rd;
31 std::mt19937 e2(rd());
32 std::uniform_real_distribution<> dist(0, 1);
35 for (
int i = 0;
i < numberNodes; ++
i) {
38 r = (r - 0.5) / 10 +
i;
39 M << 1, 0, 0, r, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1;
44 auto priorModel = noiseModel::Isotropic::Variance(6, 1
e-4);
46 first_M << 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1;
53 auto VOCovarianceModel = noiseModel::Isotropic::Variance(6, 1
e-3);
57 vo_M << 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1;
58 Pose3 relativeMotion(vo_M);
59 for (
int i = 0;
i < numberNodes - 1; ++
i) {
66 for (
int i = 0;
i < numberNodes; ++
i) {
71 params.setVerbosity(
"ERROR");
72 params.setOrderingType(
"METIS");
73 params.setLinearSolverType(
"MULTIFRONTAL_CHOLESKY");
79 int numberNodes = stoi(argv[1]);
80 cout <<
"number of_nodes: " << numberNodes << endl;