44template <
class CALIBRATION>
54 std::shared_ptr<CALIBRATION>
K_;
74 const std::shared_ptr<CALIBRATION> K,
76 : Base(sharedNoiseModel, params),
K_(K) {
88 const std::shared_ptr<CALIBRATION> K,
89 const std::optional<Pose3> body_P_sensor,
106 std::cout << s <<
"SmartProjectionPoseFactor, z = \n ";
112 const This *e =
dynamic_cast<const This*
>(&p);
128 typename Base::Cameras
cameras;
130 const Pose3 world_P_sensor_k =
133 cameras.emplace_back(world_P_sensor_k,
K_);
140#if GTSAM_ENABLE_BOOST_SERIALIZATION
142 friend class boost::serialization::access;
143 template<
class ARCHIVE>
144 void serialize(ARCHIVE & ar,
const unsigned int ) {
145 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
146 ar & BOOST_SERIALIZATION_NVP(
K_);
153template<
class CALIBRATION>
155 SmartProjectionPoseFactor<CALIBRATION> > {
Base class for smart projection factors.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
A pinhole camera class that has a Pose3 and a fixed Calibration.
Definition PinholePose.h:236
A 3D pose (R,t) : (Rot3,Point3).
Definition Pose3.h:42
KeyVector keys_
The keys involved in this factor.
Definition Factor.h:88
Nonlinear factor base class.
Definition NonlinearFactor.h:70
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
const ValueType at(Key j) const
Retrieve a variable by key j.
Definition Values-inl.h:260
std::optional< Pose3 > body_P_sensor_
Definition SmartFactorBase.h:83
Definition SmartFactorParams.h:42
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
Definition SmartProjectionFactorBase.h:109
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Definition SmartProjectionFactorBase.h:96
SmartProjectionFactorBase()
Definition SmartProjectionFactorBase.h:73
If you are using the factor, please cite: L.
Definition SmartProjectionPoseFactor.h:46
SmartProjectionPoseFactor(const SharedNoiseModel &sharedNoiseModel, const std::shared_ptr< CALIBRATION > K, const SmartProjectionParams ¶ms=SmartProjectionParams())
Constructor.
Definition SmartProjectionPoseFactor.h:72
std::shared_ptr< CALIBRATION > K_
calibration object (one for all cameras)
Definition SmartProjectionPoseFactor.h:54
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
Definition SmartProjectionPoseFactor.h:111
Base::Cameras cameras(const Values &values) const override
Collect all cameras involved in this factor.
Definition SmartProjectionPoseFactor.h:127
SmartProjectionPoseFactor(const SharedNoiseModel &sharedNoiseModel, const std::shared_ptr< CALIBRATION > K, const std::optional< Pose3 > body_P_sensor, const SmartProjectionParams ¶ms=SmartProjectionParams())
Constructor.
Definition SmartProjectionPoseFactor.h:86
const std::shared_ptr< CALIBRATION > calibration() const
return calibration shared pointers
Definition SmartProjectionPoseFactor.h:117
~SmartProjectionPoseFactor() override
Virtual destructor.
Definition SmartProjectionPoseFactor.h:96
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print
Definition SmartProjectionPoseFactor.h:104
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Definition SmartProjectionPoseFactor.h:59
SmartProjectionPoseFactor()
Default constructor, only for serialization.
Definition SmartProjectionPoseFactor.h:64