Go to the documentation of this file.
39 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
40 #include <boost/serialization/nvp.hpp>
46 namespace serialization {
58 template<
class CAMERA,
class LANDMARK>
92 Key cameraKey,
Key landmarkKey)
105 return std::static_pointer_cast<gtsam::NonlinearFactor>(
122 const This*
e =
dynamic_cast<const This*
>(&
p);
132 catch( CheiralityException&
e [[maybe_unused]]) {
133 if (H1) *H1 = JacobianC::Zero();
134 if (H2) *H2 = JacobianL::Zero();
143 if (!this->
active(values))
return std::shared_ptr<JacobianFactor>();
153 }
catch (CheiralityException&
e [[maybe_unused]]) {
173 model = std::static_pointer_cast<noiseModel::Constrained>(
noiseModel)->unit();
176 return std::make_shared<BinaryJacobianFactor<2, DimC, DimL> >(
key1, H1,
key2, H2,
b,
model);
185 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
187 friend class boost::serialization::access;
188 template<
class Archive>
189 void serialize(Archive & ar,
const unsigned int ) {
191 ar & boost::serialization::make_nvp(
"NoiseModelFactor2",
192 boost::serialization::base_object<Base>(*
this));
198 template<
class CAMERA,
class LANDMARK>
200 GeneralSFMFactor<CAMERA, LANDMARK> > {
207 template<
class CALIBRATION>
242 return std::static_pointer_cast<gtsam::NonlinearFactor>(
259 const This*
e =
dynamic_cast<const This*
>(&
p);
271 if (H1) *H1 = Matrix::Zero(2, 6);
272 if (H2) *H2 = Matrix::Zero(2, 3);
273 if (H3) *H3 = Matrix::Zero(2,
DimK);
286 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
288 friend class boost::serialization::access;
289 template<
class Archive>
290 void serialize(Archive & ar,
const unsigned int ) {
292 ar & boost::serialization::make_nvp(
"NoiseModelFactor3",
293 boost::serialization::base_object<Base>(*
this));
299 template<
class CALIBRATION>
301 GeneralSFMFactor2<CALIBRATION> > {
std::shared_ptr< GaussianFactor > linearize(const Values &values) const override
Linearize using fixed-size matrices.
GeneralSFMFactor2< CALIBRATION > This
std::shared_ptr< This > shared_ptr
Namespace containing all symbols from the Eigen library.
A binary JacobianFactor specialization that uses fixed matrix math for speed.
typedef and functions to augment Eigen's VectorXd
Array< double, 1, 3 > e(1./3., 0.5, 2.)
gtsam::NonlinearFactor::shared_ptr clone() const override
Concept check for values that can be used in unit tests.
Typedefs for easier changing of types.
typedef and functions to augment Eigen's MatrixXd
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
GeneralSFMFactor< CAMERA, LANDMARK > This
typedef for this object
static Pose3 pose3(rt3, pt3)
std::shared_ptr< Factor > shared_ptr
A shared_ptr to this class.
virtual bool active(const Values &) const
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
Point2 measured_
the 2D measurement
gtsam::NonlinearFactor::shared_ptr clone() const override
const SharedNoiseModel & noiseModel() const
access to the noise model
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Access to matrices via blocks of pre-defined sizes. Used in GaussianFactor and GaussianConditional.
Eigen::Matrix< double, 2, DimC > JacobianC
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
noiseModel::Diagonal::shared_ptr SharedDiagonal
Base class for all pinhole cameras.
Vector evaluateError(const Pose3 &pose3, const Point3 &point, const CALIBRATION &calib, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
Vector evaluateError(const CAMERA &camera, const LANDMARK &point, OptionalMatrixType H1, OptionalMatrixType H2) const override
Base class and basic functions for Manifold types.
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
noiseModel::Base::shared_ptr SharedNoiseModel
Eigen::Matrix< double, 2, DimL > JacobianL
noiseModel::Diagonal::shared_ptr model
const Point2 measured() const
Non-linear factor base classes.
GeneralSFMFactor2(const Point2 &measured, const SharedNoiseModel &model, Key poseKey, Key landmarkKey, Key calibKey)
Continuous, differentiable manifold values for.
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
static const Eigen::MatrixBase< Vector2 >::ConstantReturnType Z_2x1
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
void print(const std::string &s="SFMFactor2", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Matrix * OptionalMatrixType
The matrix class, also used for vectors and row-vectors.
Give fixed size dimension of a type, fails at compile time if dynamic.
static const CalibratedCamera camera(kDefaultPose)
Point2 measured_
the 2D measurement
GeneralSFMFactor(const Point2 &measured, const SharedNoiseModel &model, Key cameraKey, Key landmarkKey)
std::uint64_t Key
Integer nonlinear key type.
#define GTSAM_CONCEPT_MANIFOLD_TYPE(T)
const Point2 measured() const
void print(const std::string &s="SFMFactor", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
3D Pose manifold SO(3) x R^3 and group SE(3)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:35