44 template<
class CALIBRATION>
46 PinholePose<CALIBRATION> > {
55 boost::shared_ptr<CALIBRATION>
K_;
75 const boost::shared_ptr<CALIBRATION> K,
76 const boost::optional<Pose3> body_P_sensor = boost::none,
78 Base(sharedNoiseModel, body_P_sensor, params),
K_(K) {
91 DefaultKeyFormatter)
const {
92 std::cout << s <<
"SmartProjectionPoseFactor, z = \n ";
98 const This *e = dynamic_cast<const This*>(&p);
106 if (this->
active(values)) {
141 template<
class ARCHIVE>
142 void serialize(ARCHIVE & ar,
const unsigned int ) {
143 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
144 ar & BOOST_SERIALIZATION_NVP(
K_);
151 template<
class CALIBRATION>
153 SmartProjectionPoseFactor<CALIBRATION> > {
This is the base class for all factor types.
Definition: Factor.h:54
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition: SmartProjectionFactor.h:101
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
ValueType at(Key j) const
Retrieve a variable by key j.
Definition: Values-inl.h:342
double totalReprojectionError(const Cameras &cameras, boost::optional< Point3 > externalPoint=boost::none) const
Calculate the error of the factor.
Definition: SmartProjectionFactor.h:390
SmartProjectionFactor: triangulates point and keeps an estimate of it around.
Definition: SmartProjectionFactor.h:45
SmartProjectionPoseFactor()
Default constructor, only for serialization.
Definition: SmartProjectionPoseFactor.h:65
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Definition: PinholePose.h:237
CameraSet< CAMERA > Cameras
shorthand for a set of cameras
Definition: SmartProjectionFactor.h:73
SmartProjectionPoseFactor(const SharedNoiseModel &sharedNoiseModel, const boost::shared_ptr< CALIBRATION > K, const boost::optional< Pose3 > body_P_sensor=boost::none, const SmartProjectionParams ¶ms=SmartProjectionParams())
Constructor.
Definition: SmartProjectionPoseFactor.h:74
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
boost::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Definition: SmartProjectionPoseFactor.h:60
const boost::shared_ptr< CALIBRATION > calibration() const
return calibration shared pointers
Definition: SmartProjectionPoseFactor.h:114
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33
friend class boost::serialization::access
Serialization function.
Definition: SmartProjectionPoseFactor.h:140
Nonlinear factor base class.
Definition: NonlinearFactor.h:50
Definition: SmartProjectionPoseFactor.h:45
Definition: SmartFactorParams.h:42
virtual bool equals(const NonlinearFactor &p, double tol=1e-9) const
equals
Definition: SmartProjectionPoseFactor.h:97
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Base::Cameras cameras(const Values &values) const
Collect all cameras involved in this factor.
Definition: SmartProjectionPoseFactor.h:124
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition: SmartProjectionPoseFactor.h:90
virtual ~SmartProjectionPoseFactor()
Virtual destructor.
Definition: SmartProjectionPoseFactor.h:82
virtual bool active(const Values &) const
Checks whether a factor should be used based on a set of values.
Definition: NonlinearFactor.h:113
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
noiseModel::Base::shared_ptr SharedNoiseModel
Note, deliberately not in noiseModel namespace.
Definition: NoiseModel.h:1072
KeyVector keys_
The keys involved in this factor.
Definition: Factor.h:72
Smart factor on cameras (pose + calibration)
virtual bool equals(const NonlinearFactor &p, double tol=1e-9) const
equals
Definition: SmartProjectionFactor.h:113
boost::shared_ptr< CALIBRATION > K_
calibration object (one for all cameras)
Definition: SmartProjectionPoseFactor.h:55
boost::optional< Pose3 > body_P_sensor_
Pose of the camera in the body frame.
Definition: SmartFactorBase.h:79
virtual double error(const Values &values) const
error calculates the error of the factor.
Definition: SmartProjectionPoseFactor.h:105