Go to the documentation of this file.
24 #include <gtsam_unstable/dllexport.h>
34 template <
class POSE,
class LANDMARK,
class CALIBRATION = Cal3_S2>
46 typedef NoiseModelFactor4<POSE, POSE, LANDMARK, CALIBRATION>
Base;
49 using Base::evaluateError;
89 return std::static_pointer_cast<NonlinearFactor>(
98 std::cout <<
s <<
"ProjectionFactorPPPC, z = ";
105 const This *
e =
dynamic_cast<const This*
>(&
p);
107 && Base::equals(
p,
tol)
116 if(H1 || H2 || H3 || H4) {
122 return reprojectionError;
128 if (H1) *H1 = Matrix::Zero(2,6);
129 if (H2) *H2 = Matrix::Zero(2,6);
130 if (H3) *H3 = Matrix::Zero(2,3);
131 if (H4) *H4 = Matrix::Zero(2,CALIBRATION::Dim());
138 return Vector::Ones(2) * 2.0 *
K.fx();
154 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
155 friend class boost::serialization::access;
157 template<
class ARCHIVE>
158 void serialize(ARCHIVE & ar,
const unsigned int ) {
159 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
168 template<
class POSE,
class LANDMARK,
class CALIBRATION>
170 public Testable<ProjectionFactorPPPC<POSE, LANDMARK, CALIBRATION> > {
ProjectionFactorPPPC(const Point2 &measured, const SharedNoiseModel &model, Key poseKey, Key transformKey, Key pointKey, Key calibKey, bool throwCheirality=false, bool verboseCheirality=false)
std::shared_ptr< This > shared_ptr
NoiseModelFactor4< POSE, POSE, LANDMARK, CALIBRATION > Base
shorthand for base class type
bool verboseCheirality() const
Point2 measured_
2D measurement
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
~ProjectionFactorPPPC() override
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
const gtsam::Key pointKey
Array< double, 1, 3 > e(1./3., 0.5, 2.)
The most common 5DOF 3D->2D calibration.
ProjectionFactorPPPC()
Default constructor.
NonlinearFactor::shared_ptr clone() const override
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
bool verboseCheirality_
If true, prints text for Cheirality exceptions (default: false)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Base class for all pinhole cameras.
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
noiseModel::Base::shared_ptr SharedNoiseModel
noiseModel::Diagonal::shared_ptr model
const Point2 & measured() const
Non-linear factor base classes.
bool throwCheirality() const
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Matrix * OptionalMatrixType
bool throwCheirality_
If true, rethrows Cheirality exceptions (default: false)
static const CalibratedCamera camera(kDefaultPose)
std::uint64_t Key
Integer nonlinear key type.
Vector evaluateError(const Pose3 &pose, const Pose3 &transform, const Point3 &point, const CALIBRATION &K, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3, OptionalMatrixType H4) const override
Evaluate error h(x)-z and optionally derivatives.
ProjectionFactorPPPC< POSE, LANDMARK, CALIBRATION > This
shorthand for this class
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:53