simulated3D.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 // \callgraph
19 
20 #pragma once
21 
22 #include <gtsam/base/Matrix.h>
23 #include <gtsam/geometry/Point3.h>
27 
28 // \namespace
29 
30 namespace gtsam {
31 namespace simulated3D {
32 
43  if (H) *H = I_3x3;
44  return x;
45 }
46 
50 Point3 odo(const Point3& x1, const Point3& x2,
53  if (H1) *H1 = -1 * I_3x3;
54  if (H2) *H2 = I_3x3;
55  return x2 - x1;
56 }
57 
61 Point3 mea(const Point3& x, const Point3& l,
64  if (H1) *H1 = -1 * I_3x3;
65  if (H2) *H2 = I_3x3;
66  return l - x;
67 }
68 
72 struct PointPrior3D: public NoiseModelFactor1<Point3> {
73  using NoiseModelFactor1<Point3>::evaluateError;
74 
76 
85  }
86 
94  Vector evaluateError(const Point3& x, OptionalMatrixType H) const override {
95  return simulated3D::prior(x, H) - measured_;
96  }
97 };
98 
102 struct Simulated3DMeasurement: public NoiseModelFactorN<Point3, Point3> {
103  using NoiseModelFactor2<Point3, Point3>::evaluateError;
104 
106 
116 
126  OptionalMatrixType H1, OptionalMatrixType H2) const override {
127  return mea(x1, x2, H1, H2) - measured_;
128  }
129 };
130 
131 }} // namespace simulated3D
gtsam::simulated3D::mea
Point3 mea(const Point3 &x, const Point3 &l, OptionalJacobian< 3, 3 > H1=OptionalNone, OptionalJacobian< 3, 3 > H2=OptionalNone)
Definition: simulated3D.h:61
H
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
Definition: gnuplot_common_settings.hh:74
gtsam::simulated3D::Simulated3DMeasurement
Definition: simulated3D.h:102
gtsam::simulated3D::Simulated3DMeasurement::measured_
Point3 measured_
Linear displacement between a pose and landmark.
Definition: simulated3D.h:105
gtsam::simulated3D::Simulated3DMeasurement::evaluateError
Vector evaluateError(const Point3 &x1, const Point3 &x2, OptionalMatrixType H1, OptionalMatrixType H2) const override
Definition: simulated3D.h:125
Matrix.h
typedef and functions to augment Eigen's MatrixXd
x
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
Definition: gnuplot_common_settings.hh:12
measured
Point2 measured(-17, 30)
gtsam::simulated3D::PointPrior3D::PointPrior3D
PointPrior3D(const Point3 &measured, const SharedNoiseModel &model, Key key)
Definition: simulated3D.h:83
Point3.h
3D Point
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
OptionalNone
#define OptionalNone
Definition: NonlinearFactor.h:49
NoiseModelFactor1
#define NoiseModelFactor1
Definition: NonlinearFactor.h:764
x1
Pose3 x1
Definition: testPose3.cpp:663
gtsam::NoiseModelFactorN
Definition: NonlinearFactor.h:431
l
static const Line3 l(Rot3(), 1, 1)
gtsam::simulated3D::PointPrior3D::evaluateError
Vector evaluateError(const Point3 &x, OptionalMatrixType H) const override
Definition: simulated3D.h:94
OptionalJacobian.h
Special class for optional Jacobian arguments.
VectorValues.h
Factor Graph Values.
gtsam::SharedNoiseModel
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:762
model
noiseModel::Diagonal::shared_ptr model
Definition: doc/Code/Pose2SLAMExample.cpp:7
gtsam::simulated3D::Simulated3DMeasurement::Simulated3DMeasurement
Simulated3DMeasurement(const Point3 &measured, const SharedNoiseModel &model, Key i, Key j)
Definition: simulated3D.h:114
key
const gtsam::Symbol key('X', 0)
NonlinearFactor.h
Non-linear factor base classes.
gtsam
traits
Definition: SFMdata.h:40
gtsam::simulated3D::PointPrior3D
Definition: simulated3D.h:72
gtsam::OptionalJacobian
Definition: OptionalJacobian.h:38
gtsam::Point3
Vector3 Point3
Definition: Point3.h:38
gtsam::simulated3D::odo
Point3 odo(const Point3 &x1, const Point3 &x2, OptionalJacobian< 3, 3 > H1=OptionalNone, OptionalJacobian< 3, 3 > H2=OptionalNone)
Definition: simulated3D.h:50
gtsam::OptionalMatrixType
Matrix * OptionalMatrixType
Definition: NonlinearFactor.h:55
gtsam::simulated3D::prior
Point3 prior(const Point3 &x, OptionalJacobian< 3, 3 > H=OptionalNone)
Definition: simulated3D.h:42
gtsam::simulated3D::PointPrior3D::measured_
Point3 measured_
The prior pose value for the variable attached to this factor.
Definition: simulated3D.h:75
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
x2
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:19