30 using namespace gtsam;
46 Values() : nrPoses_(0), nrPoints_(0) {
51 Base(base), nrPoses_(0), nrPoints_(0) {
107 if (H1) *H1 = -I_2x2;
120 if (H1) *H1 = -I_2x2;
128 template<
class VALUE = Po
int2>
137 using Base::evaluateError;
143 Base(model, key), measured_(z) {
163 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 164 friend class boost::serialization::access; 166 template<
class ARCHIVE>
167 void serialize(ARCHIVE & ar,
const unsigned int ) {
168 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
169 ar & BOOST_SERIALIZATION_NVP(measured_);
177 template<
class VALUE = Po
int2>
186 using Base::evaluateError;
192 Base(model, i1, i2), measured_(measured) {
198 return (
odo(x1, x2, H1, H2) - measured_);
213 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 214 friend class boost::serialization::access; 216 template<
class ARCHIVE>
217 void serialize(ARCHIVE & ar,
const unsigned int ) {
218 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
219 ar & BOOST_SERIALIZATION_NVP(measured_);
227 template<
class POSE,
class LANDMARK>
232 typedef std::shared_ptr<GenericMeasurement<POSE, LANDMARK> >
shared_ptr;
237 using Base::evaluateError;
243 Base(model, i, j), measured_(measured) {
249 return (
mea(x1, x2, H1, H2) - measured_);
264 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 265 friend class boost::serialization::access; 267 template<
class ARCHIVE>
268 void serialize(ARCHIVE & ar,
const unsigned int ) {
269 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
270 ar & BOOST_SERIALIZATION_NVP(measured_);
291 template<
class POSE,
class LANDMARK>
293 simulated2D::GenericMeasurement<POSE, LANDMARK> > {
const gtsam::Symbol key('X', 0)
std::shared_ptr< GenericOdometry< VALUE > > shared_ptr
gtsam::NonlinearFactor::shared_ptr clone() const override
GenericPrior()
Default constructor.
gtsam::NonlinearFactor::shared_ptr clone() const override
GenericOdometry()
Default constructor.
Factor Graph consisting of non-linear factors.
std::string serialize(const T &input)
serializes to a string
Point2 prior(const Point2 &x)
Prior on a single pose.
noiseModel::Diagonal::shared_ptr model
Point2 odo(const Point2 &x1, const Point2 &x2)
odometry between two poses
VALUE Pose
shortcut to Pose type
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
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
GenericOdometry< VALUE > This
Vector evaluateError(const Pose &x1, const Landmark &x2, OptionalMatrixType H1, OptionalMatrixType H2) const override
Evaluate error and optionally return derivatives.
GenericOdometry(const Pose &measured, const SharedNoiseModel &model, Key i1, Key i2)
Create odometry.
GenericPrior< VALUE > This
static const Line3 l(Rot3(), 1, 1)
Matrix * OptionalMatrixType
~GenericOdometry() override
void insertPose(Key i, const Point2 &p)
Insert a pose.
GenericMeasurement(const Landmark &measured, const SharedNoiseModel &model, Key i, Key j)
Create measurement factor.
Vector evaluateError(const Pose &x1, const Pose &x2, OptionalMatrixType H1, OptionalMatrixType H2) const override
Evaluate error and optionally return derivatives.
GenericMeasurement< Point2, Point2 > Measurement
Pose measured_
odometry measurement
gtsam::NonlinearFactor::shared_ptr clone() const override
void insertPoint(Key j, const Point2 &p)
Insert a point.
Vector evaluateError(const Pose &x, OptionalMatrixType H) const override
Return error and optional derivative.
std::shared_ptr< Point2 > sharedPoint
shortcut to shared Point type
GenericPrior(const Pose &z, const SharedNoiseModel &model, Key key)
Create generic prior.
GenericPrior< Point2 > Prior
Point2 point(Key j) const
Return point j.
Values(const Base &base)
Copy constructor.
Non-linear factor base classes.
std::shared_ptr< GenericPrior< VALUE > > shared_ptr
GenericOdometry< Point2 > Odometry
std::shared_ptr< GenericMeasurement< POSE, LANDMARK > > shared_ptr
std::shared_ptr< This > shared_ptr
Landmark measured_
Measurement.
NoiseModelFactorN< VALUE > Base
base class
NoiseModelFactorN< VALUE, VALUE > Base
base class
~GenericMeasurement() override
GenericMeasurement()
Default constructor.
int nrPoses() const
Number of poses.
NoiseModelFactorN< POSE, LANDMARK > Base
base class
void insert(Key j, const Value &val)
GenericMeasurement< POSE, LANDMARK > This
POSE Pose
shortcut to Pose type
Special class for optional Jacobian arguments.
Annotation indicating that a class derives from another given type.
VALUE Pose
shortcut to Pose type
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
LANDMARK Landmark
shortcut to Landmark type
int nrPoints() const
Number of points.
std::uint64_t Key
Integer nonlinear key type.
Point2 pose(Key i) const
Return pose i.
Point2 mea(const Point2 &x, const Point2 &l)
measurement between landmark and pose
noiseModel::Base::shared_ptr SharedNoiseModel
gtsam::Values Base
base class