Skip to content

Commit

Permalink
Merge pull request #635 from borglab/fix/warning
Browse files Browse the repository at this point in the history
Explicitly initialize Point3
  • Loading branch information
varunagrawal authored Dec 10, 2020
2 parents 79aedfb + 592c572 commit 6c85850
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gtsam/slam/tests/testInitializePose3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ NonlinearFactorGraph graph2() {
g.add(BetweenFactor<Pose3>(x0, x1, pose0.between(pose1), noiseModel::Isotropic::Precision(6, 1.0)));
g.add(BetweenFactor<Pose3>(x1, x2, pose1.between(pose2), noiseModel::Isotropic::Precision(6, 1.0)));
g.add(BetweenFactor<Pose3>(x2, x3, pose2.between(pose3), noiseModel::Isotropic::Precision(6, 1.0)));
g.add(BetweenFactor<Pose3>(x2, x0, Pose3(Rot3::Ypr(0.1,0,0.1), Point3()), noiseModel::Isotropic::Precision(6, 0.0))); // random pose, but zero information
g.add(BetweenFactor<Pose3>(x0, x3, Pose3(Rot3::Ypr(0.5,-0.2,0.2), Point3(10,20,30)), noiseModel::Isotropic::Precision(6, 0.0))); // random pose, but zero informatoin
// random pose, but zero information
auto noise_zero_info = noiseModel::Isotropic::Precision(6, 0.0);
g.add(BetweenFactor<Pose3>(
x2, x0, Pose3(Rot3::Ypr(0.1, 0.0, 0.1), Point3(0.0, 0.0, 0.0)),
noise_zero_info));
// random pose, but zero information
g.add(BetweenFactor<Pose3>(
x0, x3, Pose3(Rot3::Ypr(0.5, -0.2, 0.2), Point3(10, 20, 30)),
noise_zero_info));
g.addPrior(x0, pose0, model);
return g;
}
Expand Down

0 comments on commit 6c85850

Please sign in to comment.