gtsam
Loading...
Searching...
No Matches
SmartProjectionFactor.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
19
20#pragma once
21
23
24namespace gtsam {
25
31template <class CAMERA>
33 private:
36
37 public:
39 using shared_ptr = std::shared_ptr<This>;
40
43
46 const SharedNoiseModel& sharedNoiseModel,
48 : Base(sharedNoiseModel, params) {}
49
51 bool equals(const NonlinearFactor& factor, double tol = 1e-9) const override {
52 const auto* other = dynamic_cast<const This*>(&factor);
53 return other && Base::equals(factor, tol);
54 }
55
56 private:
57#if GTSAM_ENABLE_BOOST_SERIALIZATION
58 friend class boost::serialization::access;
59 template <class ARCHIVE>
60 void serialize(ARCHIVE& archive, const unsigned int /*version*/) {
61 archive& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
62 }
63#endif
64};
65
67template <class CAMERA>
69 : public Testable<SmartProjectionFactor<CAMERA>> {};
70
71} // namespace gtsam
Base class for smart projection factors.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
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
Nonlinear factor base class.
Definition NonlinearFactor.h:70
Definition SmartFactorParams.h:42
Smart factor for monocular cameras whose pose and calibration are variables.
Definition SmartProjectionFactor.h:32
std::shared_ptr< This > shared_ptr
Shorthand for a smart pointer to this factor.
Definition SmartProjectionFactor.h:39
SmartProjectionFactor(const SharedNoiseModel &sharedNoiseModel, const SmartProjectionParams &params=SmartProjectionParams())
Construct from an isotropic measurement noise model and parameters.
Definition SmartProjectionFactor.h:45
SmartProjectionFactor()=default
Default constructor, only for serialization.
bool equals(const NonlinearFactor &factor, double tol=1e-9) const override
Compare with another camera-variable smart projection factor.
Definition SmartProjectionFactor.h:51
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
Definition SmartProjectionFactorBase.h:109
SmartProjectionFactorBase()
Default constructor, only for serialization.
Definition SmartProjectionFactorBase.h:73