25 using namespace gtsam;
27 static const double sigma = 2.0;
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.
void insert(Key j, const Value &val)
#define DOUBLES_EQUAL(expected, actual, threshold)
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
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
IsDerived< DERIVEDFACTOR > push_back(boost::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
NonlinearFactorGraph graph
static const Pose2 pose2(5, 0, 0)
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
Vector unwhitenedError(const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const override
static const double sigma
static const Pose2 pose3(5, 5, 0)
const ValueType at(Key j) const
#define EXPECT(condition)
boost::shared_ptr< This > shared_ptr
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.)
static SmartStereoProjectionParams params
TEST(SmartRangeFactor, constructor)
ConstantTwistScenario scenario(Z_3x1, Vector3(v, 0, 0))
boost::shared_ptr< Base > shared_ptr
#define LONGS_EQUAL(expected, actual)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
#define EXPECT_LONGS_EQUAL(expected, actual)
const KeyVector & keys() const
Access the factor's involved variable keys.
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
static const Pose2 pose1(0, 0, 0)
noiseModel::Diagonal::shared_ptr priorNoise
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
GTSAM_EXPORT double range(const Point2 &point, OptionalJacobian< 1, 3 > H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none) const
static const Point2 p(0, 10)