44 template<
class CALIBRATION>
46 PinholePose<CALIBRATION> > {
55 boost::shared_ptr<CALIBRATION>
K_;
75 const boost::shared_ptr<CALIBRATION>
K,
77 : Base(sharedNoiseModel,
params), K_(K) {
89 const boost::shared_ptr<CALIBRATION> K,
107 std::cout <<
s <<
"SmartProjectionPoseFactor, z = \n ";
113 const This *
e =
dynamic_cast<const This*
>(&
p);
121 if (this->
active(values)) {
142 const Pose3 world_P_sensor_k =
145 cameras.emplace_back(world_P_sensor_k, K_);
154 template<
class ARCHIVE>
156 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
157 ar & BOOST_SERIALIZATION_NVP(K_);
164 template<
class CALIBRATION>
166 SmartProjectionPoseFactor<CALIBRATION> > {
Base::Cameras cameras(const Values &values) const override
double totalReprojectionError(const Cameras &cameras, boost::optional< Point3 > externalPoint=boost::none) const
SmartProjectionPoseFactor< CALIBRATION > This
boost::shared_ptr< CALIBRATION > K_
calibration object (one for all cameras)
~SmartProjectionPoseFactor() override
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
KeyVector keys_
The keys involved in this factor.
boost::optional< Pose3 > body_P_sensor_
Pose of the camera in the body frame.
friend class boost::serialization::access
Serialization function.
static const KeyFormatter DefaultKeyFormatter
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
virtual bool active(const Values &) const
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Smart factor on cameras (pose + calibration)
SmartProjectionPoseFactor(const SharedNoiseModel &sharedNoiseModel, const boost::shared_ptr< CALIBRATION > K, const boost::optional< Pose3 > body_P_sensor, const SmartProjectionParams ¶ms=SmartProjectionParams())
const ValueType at(Key j) const
const boost::shared_ptr< CALIBRATION > calibration() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static SmartStereoProjectionParams params
SmartProjectionPoseFactor()
double error(const Values &values) const override
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
Pose3 body_P_sensor() const
PinholePose< CALIBRATION > Camera
void serialize(ARCHIVE &ar, const unsigned int)
boost::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
SmartProjectionFactor< Camera > Base
std::uint64_t Key
Integer nonlinear key type.
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
noiseModel::Base::shared_ptr SharedNoiseModel
CameraSet< CAMERA > Cameras
shorthand for a set of cameras
SmartProjectionPoseFactor(const SharedNoiseModel &sharedNoiseModel, const boost::shared_ptr< CALIBRATION > K, const SmartProjectionParams ¶ms=SmartProjectionParams())