Go to the documentation of this file.
34 template<
class POSE,
class LANDMARK,
class CALIBRATION = Cal3_S2>
40 std::shared_ptr<CALIBRATION>
K_;
77 keys_.assign(poseKeys.begin(), poseKeys.end());
105 return std::static_pointer_cast<NonlinearFactor>(
114 std::cout <<
s <<
"MultiProjectionFactor, z = ";
115 std::cout <<
measured_ <<
"measurements, z = ";
116 if(this->body_P_sensor_)
117 this->body_P_sensor_->print(
" sensor pose in body frame: ");
123 const This *
e =
dynamic_cast<const This*
>(&
p);
127 && this->K_->equals(*
e->K_,
tol)
175 return reprojectionError;
179 return reprojectionError;
184 return reprojectionError;
186 }
catch( CheiralityException&
e) {
187 if (H1) *H1 = Matrix::Zero(2,6);
188 if (H2) *H2 = Matrix::Zero(2,3);
195 return Vector::Ones(2) * 2.0 *
K_->fx();
216 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
217 friend class boost::serialization::access;
219 template<
class ARCHIVE>
220 void serialize(ARCHIVE & ar,
const unsigned int ) {
221 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
223 ar & BOOST_SERIALIZATION_NVP(
K_);
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
std::shared_ptr< This > shared_ptr
MultiProjectionFactor< POSE, LANDMARK, CALIBRATION > This
shorthand for this class
NoiseModelFactor Base
shorthand for base class type
static const Pose3 pose(Rot3(Vector3(1, -1, -1).asDiagonal()), Point3(0, 0, 0.5))
const gtsam::Key pointKey
Array< double, 1, 3 > e(1./3., 0.5, 2.)
The most common 5DOF 3D->2D calibration.
bool verboseCheirality() const
MultiProjectionFactor()
Default constructor.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
std::shared_ptr< This > shared_ptr
shorthand for a smart pointer to a factor
Vector evaluateError(const Pose3 &pose, const Point3 &point, OptionalJacobian< 2, 6 > H1={}, OptionalJacobian< 2, 3 > H2={}) const
bool throwCheirality_
If true, rethrows Cheirality exceptions (default: false)
bool throwCheirality() const
Vector measured_
2D measurement for each of the n views
std::optional< POSE > body_P_sensor_
The pose of the sensor in the body frame.
static Pose3 body_P_sensor(Rot3::RzRyRx(-M_PI_2, 0.0, -M_PI_2), Point3(0.25, -0.10, 1.0))
Vector unwhitenedError(const Values &x, OptionalMatrixVecType H=nullptr) const override
Evaluate error h(x)-z and optionally derivatives.
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
const std::shared_ptr< CALIBRATION > calibration() const
NonlinearFactor::shared_ptr clone() const override
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
MultiProjectionFactor(const Vector &measured, const SharedNoiseModel &model, KeySet poseKeys, Key pointKey, const std::shared_ptr< CALIBRATION > &K, bool throwCheirality, bool verboseCheirality, std::optional< POSE > body_P_sensor={})
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Base class for all pinhole cameras.
bool verboseCheirality_
If true, prints text for Cheirality exceptions (default: false)
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
noiseModel::Base::shared_ptr SharedNoiseModel
noiseModel::Diagonal::shared_ptr model
Non-linear factor base classes.
std::vector< Matrix > * OptionalMatrixVecType
KeyVector keys_
The keys involved in this factor.
std::shared_ptr< CALIBRATION > K_
shared pointer to calibration object
bool equals(const NonlinearFactor &p, double tol=1e-9) const override
equals
static const CalibratedCamera camera(kDefaultPose)
std::uint64_t Key
Integer nonlinear key type.
MultiProjectionFactor(const Vector &measured, const SharedNoiseModel &model, KeySet poseKeys, Key pointKey, const std::shared_ptr< CALIBRATION > &K, std::optional< POSE > body_P_sensor={})
const Vector & measured() const
~MultiProjectionFactor() override
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:11