LocalizationExample2.cpp 386 B

1234567
  1. // add unary measurement factors, like GPS, on all three poses
  2. noiseModel::Diagonal::shared_ptr unaryNoise =
  3. noiseModel::Diagonal::Sigmas(Vector2(0.1, 0.1)); // 10cm std on x,y
  4. graph.add(boost::make_shared<UnaryFactor>(1, 0.0, 0.0, unaryNoise));
  5. graph.add(boost::make_shared<UnaryFactor>(2, 2.0, 0.0, unaryNoise));
  6. graph.add(boost::make_shared<UnaryFactor>(3, 4.0, 0.0, unaryNoise));