26 using namespace gtsam;
36 for (
int t = 1;
t <= 7;
t++) ordering.push_back(
X(
t));
43 for(std::shared_ptr<GaussianFactor> factor: smoother) {
46 actual.
update(factorGraph);
53 for (
const auto& [
key, clique] : expected.
nodes()) {
54 GaussianConditional::shared_ptr conditional = clique->conditional();
55 EXPECT(!conditional->get_model());
63 for (
int t = 1;
t <= 7;
t++) e.
insert(
X(
t), Vector::Zero(2));
const gtsam::Symbol key('X', 0)
void update(const FactorGraphType &newFactors, const Eliminate &function=EliminationTraitsType::DefaultEliminate)
GaussianFactorGraph createSmoother(int T)
static int runAllTests(TestResult &result)
const Nodes & nodes() const
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)
iterator insert(const std::pair< Key, Vector > &key_value)
static enum @1107 ordering
VectorValues optimize() const
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Create small example with two poses and one landmark.
TEST(ISAM, iSAM_smoother)