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)) {
131 Camera camera(pose, K_);
132 cameras.push_back(camera);
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> > {
virtual bool equals(const NonlinearFactor &p, double tol=1e-9) const
equals
Definition: SmartProjectionFactor.h:209
Nonlinear factor base class.
Definition: NonlinearFactor.h:52
SmartProjectionFactor: triangulates point and keeps an estimate of it around.
Definition: SmartProjectionFactor.h:141
This is the base class for all factor types.
Definition: Factor.h:51
Smart factor on cameras (pose + calibration)
noiseModel::Base::shared_ptr SharedNoiseModel
Note, deliberately not in noiseModel namespace.
Definition: NoiseModel.h:1072
const boost::shared_ptr< CALIBRATION > calibration() const
return calibration shared pointers
Definition: SmartProjectionPoseFactor.h:114
Definition: PinholePose.h:225
virtual ~SmartProjectionPoseFactor()
Virtual destructor.
Definition: SmartProjectionPoseFactor.h:82
boost::optional< Pose3 > body_P_sensor_
Pose of the camera in the body frame.
Definition: SmartFactorBase.h:77
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
Base::Cameras cameras(const Values &values) const
Collect all cameras involved in this factor.
Definition: SmartProjectionPoseFactor.h:124
virtual bool active(const Values &) const
Checks whether a factor should be used based on a set of values.
Definition: NonlinearFactor.h:115
Definition: SmartProjectionPoseFactor.h:45
FastVector< Key > keys_
The keys involved in this factor.
Definition: Factor.h:69
boost::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Definition: SmartProjectionPoseFactor.h:60
ValueType at(Key j) const
Retrieve a variable by key j.
Definition: Values-inl.h:343
CameraSet< CAMERA > Cameras
shorthand for a set of cameras
Definition: SmartProjectionFactor.h:169
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition: SmartProjectionFactor.h:197
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
double totalReprojectionError(const Cameras &cameras, boost::optional< Point3 > externalPoint=boost::none) const
Calculate the error of the factor.
Definition: SmartProjectionFactor.h:489
boost::shared_ptr< CALIBRATION > K_
calibration object (one for all cameras)
Definition: SmartProjectionPoseFactor.h:55
virtual double error(const Values &values) const
error calculates the error of the factor.
Definition: SmartProjectionPoseFactor.h:105
Definition: SmartProjectionFactor.h:47
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition: SmartProjectionPoseFactor.h:90
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
friend class boost::serialization::access
Serialization function.
Definition: SmartProjectionPoseFactor.h:140
SmartProjectionPoseFactor()
Default constructor, only for serialization.
Definition: SmartProjectionPoseFactor.h:65
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
virtual bool equals(const NonlinearFactor &p, double tol=1e-9) const
equals
Definition: SmartProjectionPoseFactor.h:97
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