32 using namespace gtsam;
66 typedef BatchFixedLagSmoother::KeyTimestampMap Timestamps;
84 Timestamps newTimestamps;
88 newTimestamps[key0] = 0.0;
91 fullinit.
insert(newValues);
94 smoother.
update(newFactors, newValues, newTimestamps);
109 Timestamps newTimestamps;
113 newTimestamps[
key2] = double(i);
116 fullinit.
insert(newValues);
119 smoother.
update(newFactors, newValues, newTimestamps);
135 Timestamps newTimestamps;
140 newTimestamps[
key2] = double(i);
143 fullinit.
insert(newValues);
146 smoother.
update(newFactors, newValues, newTimestamps);
161 Timestamps newTimestamps;
165 newTimestamps[
key2] = double(i);
168 fullinit.
insert(newValues);
171 smoother.
update(newFactors, newValues, newTimestamps);
186 Timestamps newTimestamps;
192 newTimestamps[
key2] = double(i);
195 fullinit.
insert(newValues);
198 smoother.
update(newFactors, newValues, newTimestamps);
215 Timestamps emptyNewTimestamps;
217 size_t factorIndex = 6;
219 factorToRemove.push_back(factorIndex);
224 smoother.
update(emptyNewFactors, emptyNewValues, emptyNewTimestamps,factorToRemove);
228 for(
size_t i=0; i< smootherFactorsBeforeRemove.
size(); i++){
230 if(smootherFactorsBeforeRemove[i] && i != factorIndex){
231 EXPECT(smootherFactorsBeforeRemove[i]->
equals(*actual[i]));
Result update(const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const KeyTimestampMap ×tamps=KeyTimestampMap(), const FactorIndices &factorsToRemove=FactorIndices()) override
VectorValues optimize(const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
static int runAllTests(TestResult &result)
A non-templated config holding any types of Manifold-group elements.
Factor Graph consisting of non-linear factors.
bool check_smoother(const NonlinearFactorGraph &fullgraph, const Values &fullinit, const BatchFixedLagSmoother &smoother, const Key &key)
void insert(Key j, const Value &val)
FastVector< FactorIndex > FactorIndices
Define collection types:
Values retract(const VectorValues &delta) const
IsDerived< DERIVEDFACTOR > push_back(boost::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
void addPrior(Key key, const T &prior, const SharedNoiseModel &model=nullptr)
const Symbol key1('v', 1)
const ValueType at(Key j) const
An LM-based fixed-lag smoother.
TEST(BatchFixedLagSmoother, Example)
#define EXPECT(condition)
Linear Factor Graph where all factors are Gaussians.
noiseModel::Diagonal::shared_ptr SharedDiagonal
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Values calculateEstimate() const override
const Symbol key2('v', 2)
Chordal Bayes Net, the result of eliminating a factor graph.
boost::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
std::uint64_t Key
Integer nonlinear key type.
const NonlinearFactorGraph & getFactors() const