25 using namespace gtsam;
27 static const double sigma = 2.0;
94 NonlinearFactor::shared_ptr clone = f.
clone();
A smart factor for range-only SLAM that does initialization and marginalization.
virtual const Values & optimize()
gtsam::NonlinearFactor::shared_ptr clone() const override
static int runAllTests(TestResult &result)
Factor Graph consisting of non-linear factors.
const ValueType at(Key j) const
#define DOUBLES_EQUAL(expected, actual, threshold)
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
void addRange(Key key, double measuredRange)
Add a range measurement to a pose with given key.
double f2(const Vector2 &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 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
GTSAM_EXPORT double range(const Point2 &point, OptionalJacobian< 1, 3 > H1={}, OptionalJacobian< 1, 2 > H2={}) const
NonlinearFactorGraph graph
static const Pose2 pose2(5, 0, 0)
static const SmartProjectionParams params
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
static const double sigma
static const Pose2 pose3(5, 5, 0)
std::shared_ptr< Base > shared_ptr
#define EXPECT(condition)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
TEST(SmartRangeFactor, constructor)
ConstantTwistScenario scenario(Z_3x1, Vector3(v, 0, 0))
#define LONGS_EQUAL(expected, actual)
#define EXPECT_LONGS_EQUAL(expected, actual)
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
const KeyVector & keys() const
Access the factor's involved variable keys.
void insert(Key j, const Value &val)
static const Pose2 pose1(0, 0, 0)
Jet< T, N > sqrt(const Jet< T, N > &f)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Vector unwhitenedError(const Values &x, OptionalMatrixVecType H=nullptr) const override
static const Point2 p(0, 10)