33 #pragma GCC diagnostic push 34 #pragma GCC diagnostic ignored "-Wunused-variable" 36 #include <boost/bind.hpp> 38 #pragma GCC diagnostic pop 40 #include <boost/assign/list_of.hpp> 42 #include <boost/iterator/counting_iterator.hpp> 45 using namespace gtsam;
56 0,
Vector2(1.0,2.0), (
Matrix(2, 2) << 3.0,4.0,0.0,6.0).finished(),
57 3, (
Matrix(2, 2) << 7.0,8.0,9.0,10.0).finished(),
58 4, (
Matrix(2, 2) << 11.0,12.0,13.0,14.0).finished()));
60 1,
Vector2(15.0,16.0), (
Matrix(2, 2) << 17.0,18.0,0.0,20.0).finished(),
61 2, (
Matrix(2, 2) << 21.0,22.0,23.0,24.0).finished(),
62 4, (
Matrix(2, 2) << 25.0,26.0,27.0,28.0).finished()));
64 2,
Vector2(29.0,30.0), (
Matrix(2, 2) << 31.0,32.0,0.0,34.0).finished(),
65 3, (
Matrix(2, 2) << 35.0,36.0,37.0,38.0).finished()));
67 3,
Vector2(39.0,40.0), (
Matrix(2, 2) << 41.0,42.0,0.0,44.0).finished(),
68 4, (
Matrix(2, 2) << 45.0,46.0,47.0,48.0).finished()));
70 4,
Vector2(49.0,50.0), (
Matrix(2, 2) << 51.0,52.0,0.0,54.0).finished()));
83 VectorValues xb = DoglegOptimizerImpl::ComputeBlend(Delta, xu, xn);
92 0,
Vector2(1.0,2.0), (
Matrix(2, 2) << 3.0,4.0,0.0,6.0).finished(),
93 3, (
Matrix(2, 2) << 7.0,8.0,9.0,10.0).finished(),
94 4, (
Matrix(2, 2) << 11.0,12.0,13.0,14.0).finished()));
96 1,
Vector2(15.0,16.0), (
Matrix(2, 2) << 17.0,18.0,0.0,20.0).finished(),
97 2, (
Matrix(2, 2) << 21.0,22.0,23.0,24.0).finished(),
98 4, (
Matrix(2, 2) << 25.0,26.0,27.0,28.0).finished()));
100 2,
Vector2(29.0,30.0), (
Matrix(2, 2) << 31.0,32.0,0.0,34.0).finished(),
101 3, (
Matrix(2, 2) << 35.0,36.0,37.0,38.0).finished()));
103 3,
Vector2(39.0,40.0), (
Matrix(2, 2) << 41.0,42.0,0.0,44.0).finished(),
104 4, (
Matrix(2, 2) << 45.0,46.0,47.0,48.0).finished()));
106 4,
Vector2(49.0,50.0), (
Matrix(2, 2) << 51.0,52.0,0.0,54.0).finished()));
137 for(
size_t it=0; it<10; ++it) {
140 double nonlinearError = fg.
error(config);
147 Delta = result.
delta;
161 auto model = noiseModel::Diagonal::Sigmas(
Vector3(0.2, 0.2, 0.1));
166 initial.insert(1,
origin);
167 initial.insert(2,
Pose2(2.3, 0.1, -0.2));
virtual const Values & optimize()
static int runAllTests(TestResult &result)
VectorValues zeroVectors() const
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 origin
noiseModel::Diagonal::shared_ptr model
void insert(Key j, const Value &val)
#define DOUBLES_EQUAL(expected, actual, threshold)
TEST(DoglegOptimizer, ComputeBlend)
NonlinearFactorGraph createReallyNonlinearFactorGraph()
VectorValues optimize() const
Solve the GaussianBayesNet, i.e. return , by back-substitution.
Some functions to compute numerical derivatives.
VectorValues optimizeGradientSearch() const
Values retract(const VectorValues &delta) const
#define CHECK_EXCEPTION(condition, exception_name)
NonlinearFactorGraph graph
double error(const VectorValues &x) const
Nonlinear factor graph optimizer using Powell's Dogleg algorithm (detail implementation) ...
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&...args)
Emplace a shared pointer to factor of given type.
const ValueType at(Key j) const
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static SmartStereoProjectionParams params
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
void setVerbosityDL(const std::string &verbosityDL)
Create small example with two poses and one landmark.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
double error(const Values &values) const
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
boost::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.