27 typedef typename POSE::Translation Translation;
28 typedef typename POSE::Rotation Rotation;
33 GTSAM_CONCEPT_POSE_TYPE(Pose)
34 GTSAM_CONCEPT_GROUP_TYPE(Pose)
35 GTSAM_CONCEPT_LIE_TYPE(Rotation)
38 static const int xDim = FixedDimension<POSE>::value;
39 static const int rDim = FixedDimension<typename POSE::Rotation>::value;
52 : Base(model,
key), measured_(rot_z) {}
56 : Base(model,
key), measured_(pose_z.rotation()) {}
61 gtsam::NonlinearFactor::shared_ptr
clone()
const override {
62 return std::static_pointer_cast<gtsam::NonlinearFactor>(
63 gtsam::NonlinearFactor::shared_ptr(
new This(*
this))); }
66 const Rotation& measured()
const {
return measured_; }
72 const This *e =
dynamic_cast<const This*
> (&expected);
79 measured_.print(
"Measured Rotation");
84 Eigen::Matrix<double, rDim, xDim> Hrotation;
85 const Rotation& newR = pose.rotation(H ? &Hrotation :
nullptr);
86#ifdef GTSAM_SLOW_BUT_CORRECT_BETWEENFACTOR
92 *H = Hlocal * Hrotation;
97 if (H) *H = Hrotation;
104#if GTSAM_ENABLE_BOOST_SERIALIZATION
106 friend class boost::serialization::access;
107 template<
class ARCHIVE>
108 void serialize(ARCHIVE & ar,
const unsigned int ) {
110 ar & boost::serialization::make_nvp(
"NoiseModelFactor1",
111 boost::serialization::base_object<Base>(*
this));
112 ar & BOOST_SERIALIZATION_NVP(measured_);
Base class and basic functions for Manifold types.
Base class for noise model factors with N variables.
Non-linear factor base classes.
#define OptionalNone
These typedefs and aliases will help with making the evaluateError interface independent of boost TOD...
Definition NonlinearFactor.h:51
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
Matrix * OptionalMatrixType
This typedef will be used everywhere boost::optional<Matrix&> reference was used previously.
Definition NonlinearFactor.h:57
NoiseModelFactorT< Vector, ValueTypes... > NoiseModelFactorN
Noise model factor with N value types and dynamic-sized error vector.
Definition NoiseModelFactorN.h:561
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
Detect whether a traits type provides Local with Jacobians.
Definition Manifold.h:145
virtual void print(const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
print
Definition Factor.cpp:29
bool equals(const This &other, double tol=1e-9) const
check equality
Definition Factor.cpp:42
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
Key key() const
Definition NoiseModelFactorN.h:307
Nonlinear factor base class.
Definition NonlinearFactor.h:70
double error(const Values &c) const override
Calculate the error of the factor.
Definition NonlinearFactor.cpp:146
Definition PoseRotationPrior.h:21
PoseRotationPrior(Key key, const Rotation &rot_z, const SharedNoiseModel &model)
standard constructor
Definition PoseRotationPrior.h:51
PoseRotationPrior(Key key, const POSE &pose_z, const SharedNoiseModel &model)
Constructor that pulls the translation from an incoming POSE.
Definition PoseRotationPrior.h:55
gtsam::NonlinearFactor::shared_ptr clone() const override
Definition PoseRotationPrior.h:61
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
equals specialized to this factor
Definition PoseRotationPrior.h:71
PoseRotationPrior()
default constructor - only use for serialization
Definition PoseRotationPrior.h:48
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print contents
Definition PoseRotationPrior.h:77
Vector evaluateError(const Pose &pose, OptionalMatrixType H) const override
h(x)-z
Definition PoseRotationPrior.h:83
Concept-checking macros for geometric objects Each macro instantiates a concept check structure,...