Hello. I'm new to gtsam and I am trying to add some bearing factors in a nonlinear factor graph. The examples I found show only the bearing/range factor implementation. How can I do it without the range measurements?
I tried this way:
// Create bearing factor from current pose to door point
Rot2 bearing_ang = Rot2::fromDegrees(13);
auto bearingNoise = noiseModel::Diagonal::Sigmas(Vector(0.1));
graph.emplace_shared<BearingFactor<Pose2, Point2>> (next_pose_num, next_door_num, bearing_ang, bearingNoise);
But I get a warning and an error while compiling:
/usr/local/include/gtsam/slam/BearingFactor.h:17:2: warning: #warning "BearingFactor is now an ExpressionFactor in SAM directory" [-Wcpp]
#warning "BearingFactor is now an ExpressionFactor in SAM directory"
/usr/local/include/gtsam/3rdparty/Eigen/Eigen/src/Core/PlainObjectBase.h:778:7: error: static assertion failed: FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED
EIGEN_STATIC_ASSERT(is_integer,
Also, I am not sure how to declare the bearing noise, since it is 1-dimensional measurement, so no matrix is required.
Any feedback is appreciated.