Go to the documentation of this file.
37 typedef NoiseModelFactor2<Pose3, Vector3>
Base;
40 using Base::evaluateError;
74 void print(
const std::string&
s =
"InvDepthFactorVariant2",
84 && Base::equals(
p,
tol)
86 && this->K_->equals(*
e->K_,
tol)
103 return Vector::Ones(2) * 2.0 *
K_->fx();
105 return (
Vector(1) << 0.0).finished();
113 (*H1) = numericalDerivative11<Vector, Pose3>(
118 (*H2) = numericalDerivative11<Vector, Vector3>(
143 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
144 friend class boost::serialization::access;
146 template<
class ARCHIVE>
147 void serialize(ARCHIVE & ar,
const unsigned int ) {
148 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
150 ar & BOOST_SERIALIZATION_NVP(
K_);
InvDepthFactorVariant2 This
shorthand for this class
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
InvDepthFactorVariant2(const Key poseKey, const Key landmarkKey, const Point2 &measured, const Cal3_S2::shared_ptr &K, const Point3 referencePoint, const SharedNoiseModel &model)
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Jet< T, N > sin(const Jet< T, N > &f)
The most common 5DOF 3D->2D calibration.
void print(const std::string &s="InvDepthFactorVariant2", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Vector evaluateError(const Pose3 &pose, const Vector3 &landmark, OptionalMatrixType H1, OptionalMatrixType H2) const override
Evaluate error h(x)-z and optionally derivatives.
Point3 referencePoint_
the reference point/origin for this landmark
Jet< T, N > cos(const Jet< T, N > &f)
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Some functions to compute numerical derivatives.
const Point2 & imagePoint() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
InvDepthFactorVariant2()
Default constructor.
static Point3 landmark(0, 0, 5)
Base class for all pinhole cameras.
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
noiseModel::Base::shared_ptr SharedNoiseModel
std::shared_ptr< Cal3_S2 > shared_ptr
noiseModel::Diagonal::shared_ptr model
const Cal3_S2::shared_ptr calibration() const
Cal3_S2::shared_ptr K_
shared pointer to calibration object
Non-linear factor base classes.
Point2 measured_
2D measurement
NoiseModelFactor2< Pose3, Vector3 > Base
shorthand for base class type
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
~InvDepthFactorVariant2() override
The most common 5DOF 3D->2D calibration.
Matrix * OptionalMatrixType
static const CalibratedCamera camera(kDefaultPose)
const Point3 & referencePoint() const
std::uint64_t Key
Integer nonlinear key type.
Vector inverseDepthError(const Pose3 &pose, const Vector3 &landmark) const
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:28