Go to the documentation of this file.
29 template<
class T,
class P>
31 const T&
trans,
const P& global,
34 return trans.transformFrom(global, Dtrans, Dglobal);
56 template<
class POINT,
class TRANSFORM>
76 :
Base(
model,globalKey, transKey, localKey) {}
91 globalKey, transKey, localKey) {}
96 return std::static_pointer_cast<NonlinearFactor>(
103 Point newlocal = transform_point<Transform,Point>(
trans, global, Dtrans, Dforeign);
112 std::cout <<
s <<
": ReferenceFrameFactor("
113 <<
"Global: " << keyFormatter(this->
key1()) <<
","
114 <<
" Transform: " << keyFormatter(this->
key2()) <<
","
115 <<
" Local: " << keyFormatter(this->
key3()) <<
")\n";
125 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
127 friend class boost::serialization::access;
128 template<
class ARCHIVE>
129 void serialize(ARCHIVE & ar,
const unsigned int ) {
130 ar & boost::serialization::make_nvp(
"NonlinearFactor3",
131 boost::serialization::base_object<Base>(*
this));
137 template<
class T1,
class T2>
std::shared_ptr< This > shared_ptr
P transform_point(const T &trans, const P &global, OptionalMatrixType Dtrans, OptionalMatrixType Dglobal)
size_t dim() const override
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::shared_ptr< Base > shared_ptr
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
NonlinearFactor::shared_ptr clone() const override
SharedNoiseModel noiseModel_
static const double sigma
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
~ReferenceFrameFactor() override
Key transform_key() const
Vector evaluateError(const Point &global, const Transform &trans, const Point &local, OptionalMatrixType Dforeign, OptionalMatrixType Dtrans, OptionalMatrixType Dlocal) const override
const SharedNoiseModel & noiseModel() const
access to the noise model
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
ReferenceFrameFactor(Key globalKey, Key transKey, Key localKey, double sigma=1e-2)
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
A small structure to hold a non zero as a triplet (i,j,value).
ReferenceFrameFactor< POINT, TRANSFORM > This
void print(const std::string &s="", const gtsam::KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
noiseModel::Diagonal::shared_ptr model
ReferenceFrameFactor(Key globalKey, Key transKey, Key localKey, const noiseModel::Base::shared_ptr &model)
Non-linear factor base classes.
ReferenceFrameFactor(double mu, Key globalKey, Key transKey, Key localKey)
NoiseModelFactorN< POINT, TRANSFORM, POINT > Base
Matrix trans(const Matrix &A)
Matrix * OptionalMatrixType
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
std::uint64_t Key
Integer nonlinear key type.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:13:06