29 using namespace gtsam;
45 Values() : nrPoses_(0), nrPoints_(0) {
50 Base(base), nrPoses_(0), nrPoints_(0) {
104 boost::none, boost::optional<Matrix&> H2 = boost::none) {
105 if (H1) *H1 = -I_2x2;
117 boost::none, boost::optional<Matrix&> H2 = boost::none) {
118 if (H1) *H1 = -I_2x2;
126 template<
class VALUE = Po
int2>
138 Base(model, key), measured_(z) {
143 return (
prior(x,
H) - measured_);
159 friend class boost::serialization::access;
160 template<
class ARCHIVE>
162 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
163 ar & BOOST_SERIALIZATION_NVP(measured_);
170 template<
class VALUE = Po
int2>
175 typedef boost::shared_ptr<GenericOdometry<VALUE> >
shared_ptr;
182 Base(model, i1, i2), measured_(measured) {
187 boost::optional<Matrix&> H1 = boost::none,
188 boost::optional<Matrix&> H2 = boost::none)
const override {
189 return (
odo(x1, x2, H1, H2) - measured_);
205 friend class boost::serialization::access;
206 template<
class ARCHIVE>
208 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
209 ar & BOOST_SERIALIZATION_NVP(measured_);
216 template<
class POSE,
class LANDMARK>
221 typedef boost::shared_ptr<GenericMeasurement<POSE, LANDMARK> >
shared_ptr;
229 Base(model, i, j), measured_(measured) {
234 boost::optional<Matrix&> H1 = boost::none,
235 boost::optional<Matrix&> H2 = boost::none)
const override {
236 return (
mea(x1, x2, H1, H2) - measured_);
252 friend class boost::serialization::access;
253 template<
class ARCHIVE>
255 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
256 ar & BOOST_SERIALIZATION_NVP(measured_);
276 template<
class POSE,
class LANDMARK>
278 simulated2D::GenericMeasurement<POSE, LANDMARK> > {
boost::shared_ptr< GenericMeasurement< POSE, LANDMARK > > shared_ptr
gtsam::NonlinearFactor::shared_ptr clone() const override
GenericPrior()
Default constructor.
gtsam::NonlinearFactor::shared_ptr clone() const override
NoiseModelFactor2< POSE, LANDMARK > Base
base class
GenericOdometry()
Default constructor.
Factor Graph consisting of non-linear factors.
Point2 prior(const Point2 &x)
Prior on a single pose.
noiseModel::Diagonal::shared_ptr model
void insert(Key j, const Value &val)
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
NoiseModelFactor2< VALUE, VALUE > Base
base class
Vector evaluateError(const Pose &x, boost::optional< Matrix & > H=boost::none) const override
Return error and optional derivative.
Point2 point(Key j) const
Return point j.
GenericOdometry(const Pose &measured, const SharedNoiseModel &model, Key i1, Key i2)
Create odometry.
void serialize(ARCHIVE &ar, const unsigned int)
NoiseModelFactor1< VALUE > Base
base class
GenericPrior< VALUE > This
static const Line3 l(Rot3(), 1, 1)
~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 Landmark &x2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
Evaluate error and optionally return derivatives.
GenericMeasurement< Point2, Point2 > Measurement
Point2 pose(Key i) const
Return pose i.
Vector evaluateError(const Pose &x1, const Pose &x2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
Evaluate error and optionally return derivatives.
Pose measured_
odometry measurement
boost::shared_ptr< This > shared_ptr
gtsam::NonlinearFactor::shared_ptr clone() const override
void insertPoint(Key j, const Point2 &p)
Insert a point.
int nrPoses() const
Number of poses.
GenericPrior(const Pose &z, const SharedNoiseModel &model, Key key)
Create generic prior.
GenericPrior< Point2 > Prior
Values(const Base &base)
Copy constructor.
void serialize(ARCHIVE &ar, const unsigned int)
void serialize(ARCHIVE &ar, const unsigned int)
Non-linear factor base classes.
GenericOdometry< Point2 > Odometry
boost::shared_ptr< Point2 > sharedPoint
shortcut to shared Point type
Landmark measured_
Measurement.
~GenericMeasurement() override
GenericMeasurement()
Default constructor.
boost::shared_ptr< GenericOdometry< VALUE > > shared_ptr
GenericMeasurement< POSE, LANDMARK > This
POSE Pose
shortcut to Pose type
Annotation indicating that a class derives from another given type.
VALUE Pose
shortcut to Pose type
boost::shared_ptr< GenericPrior< VALUE > > shared_ptr
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
std::uint64_t Key
Integer nonlinear key type.
Point2 mea(const Point2 &x, const Point2 &l)
measurement between landmark and pose
noiseModel::Base::shared_ptr SharedNoiseModel
int nrPoints() const
Number of points.
gtsam::Values Base
base class