15 :
Base(model, poseKey, pointKey), measured_(measured)
21 boost::optional<Matrix&> H1, boost::optional<Matrix&> H2)
const {
22 double hx = pose.
z() - point.z();
24 *H1 = Matrix::Zero(1,6);
32 *H2 = Matrix::Zero(1,3);
46 std::cout << s <<
"RelativeElevationFactor, relative elevation = " <<
measured_ << std::endl;
Point3 r1() const
first column
RelativeElevationFactor()
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
noiseModel::Diagonal::shared_ptr model
const gtsam::Key pointKey
Vector evaluateError(const Pose3 &pose, const Point3 &point, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Point3 r2() const
second column
static const Pose3 pose(Rot3(Vector3(1,-1,-1).asDiagonal()), Point3(0, 0, 0.5))
Point3 r3() const
third column
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Factor representing a known relative altitude in global frame.
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Base::shared_ptr SharedNoiseModel
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation