#include <ConcurrentBatchSmoother.h>
Classes | |
struct | Result |
Public Types | |
typedef ConcurrentSmoother | Base |
typedef for base class More... | |
typedef std::shared_ptr< ConcurrentBatchSmoother > | shared_ptr |
Public Types inherited from gtsam::ConcurrentSmoother | |
typedef std::shared_ptr< ConcurrentSmoother > | shared_ptr |
Public Member Functions | |
Values | calculateEstimate () const |
template<class VALUE > | |
VALUE | calculateEstimate (Key key) const |
ConcurrentBatchSmoother (const LevenbergMarquardtParams ¶meters=LevenbergMarquardtParams()) | |
bool | equals (const ConcurrentSmoother &rhs, double tol=1e-9) const override |
const VectorValues & | getDelta () const |
const NonlinearFactorGraph & | getFactors () const |
const Values & | getLinearizationPoint () const |
const Ordering & | getOrdering () const |
void | getSummarizedFactors (NonlinearFactorGraph &summarizedFactors, Values &separatorValues) override |
void | postsync () override |
void | presync () override |
void | print (const std::string &s="Concurrent Batch Smoother:\, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override |
void | synchronize (const NonlinearFactorGraph &smootherFactors, const Values &smootherValues, const NonlinearFactorGraph &summarizedFactors, const Values &separatorValues) override |
virtual Result | update (const NonlinearFactorGraph &newFactors=NonlinearFactorGraph(), const Values &newTheta=Values(), const std::optional< std::vector< size_t > > &removeFactorIndices={}) |
~ConcurrentBatchSmoother () override | |
Public Member Functions inherited from gtsam::ConcurrentSmoother | |
ConcurrentSmoother () | |
virtual | ~ConcurrentSmoother ()=default |
Protected Attributes | |
std::queue< size_t > | availableSlots_ |
The set of available factor graph slots caused by deleting factors. More... | |
VectorValues | delta_ |
The current set of linear deltas from the linearization point. More... | |
NonlinearFactorGraph | factors_ |
The set of all factors currently in the smoother. More... | |
std::vector< size_t > | filterSummarizationSlots_ |
The slots in factor graph that correspond to the current filter summarization factors. More... | |
Ordering | ordering_ |
The current ordering used to calculate the linear deltas. More... | |
LevenbergMarquardtParams | parameters_ |
LM parameters. More... | |
Values | separatorValues_ |
The linearization points of the separator variables. These should not be updated during optimization. More... | |
NonlinearFactorGraph | smootherSummarization_ |
A temporary holding place for calculated smoother summarization. More... | |
Values | theta_ |
Current linearization point of all variables in the smoother. More... | |
VariableIndex | variableIndex_ |
The current variable index, which allows efficient factor lookup by variable. More... | |
Private Member Functions | |
std::vector< size_t > | insertFactors (const NonlinearFactorGraph &factors) |
Result | optimize () |
void | removeFactors (const std::vector< size_t > &slots) |
void | reorder () |
void | updateSmootherSummarization () |
Static Private Member Functions | |
static void | PrintLinearFactor (const GaussianFactor::shared_ptr &factor, const std::string &indent="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) |
static void | PrintNonlinearFactor (const NonlinearFactor::shared_ptr &factor, const std::string &indent="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) |
A Levenberg-Marquardt Batch Smoother that implements the Concurrent Filtering and Smoother interface.
Definition at line 31 of file ConcurrentBatchSmoother.h.
typedef for base class
Definition at line 35 of file ConcurrentBatchSmoother.h.
typedef std::shared_ptr<ConcurrentBatchSmoother> gtsam::ConcurrentBatchSmoother::shared_ptr |
Definition at line 34 of file ConcurrentBatchSmoother.h.
|
inline |
Default constructor
Definition at line 57 of file ConcurrentBatchSmoother.h.
|
inlineoverride |
Default destructor
Definition at line 60 of file ConcurrentBatchSmoother.h.
|
inline |
Compute the current best estimate of all variables and return a full Values structure. If only a single variable is needed, it may be faster to call calculateEstimate(const KEY&).
Definition at line 91 of file ConcurrentBatchSmoother.h.
|
inline |
Compute the current best estimate of a single variable. This is generally faster than calling the no-argument version of calculateEstimate if only specific variables are needed.
key |
Definition at line 101 of file ConcurrentBatchSmoother.h.
|
overridevirtual |
Check if two Concurrent Smoothers are equal
Implements gtsam::ConcurrentSmoother.
Definition at line 38 of file ConcurrentBatchSmoother.cpp.
|
inline |
Access the current set of deltas to the linearization point
Definition at line 84 of file ConcurrentBatchSmoother.h.
|
inline |
Access the current set of factors
Definition at line 69 of file ConcurrentBatchSmoother.h.
|
inline |
Access the current linearization point
Definition at line 74 of file ConcurrentBatchSmoother.h.
|
inline |
Access the current ordering
Definition at line 79 of file ConcurrentBatchSmoother.h.
|
overridevirtual |
Populate the provided containers with factors that constitute the smoother branch summarization needed by the filter.
summarizedFactors | The summarized factors for the filter branch |
Implements gtsam::ConcurrentSmoother.
Definition at line 115 of file ConcurrentBatchSmoother.cpp.
|
private |
Augment the graph with new factors
factors | The factors to add to the graph |
Definition at line 186 of file ConcurrentBatchSmoother.cpp.
|
private |
Use a modified version of L-M to update the linearization point and delta
Definition at line 243 of file ConcurrentBatchSmoother.cpp.
|
overridevirtual |
Perform any required operations after the synchronization process finishes. Called by 'synchronize'
Reimplemented from gtsam::ConcurrentSmoother.
Definition at line 178 of file ConcurrentBatchSmoother.cpp.
|
overridevirtual |
Perform any required operations before the synchronization process starts. Called by 'synchronize'
Reimplemented from gtsam::ConcurrentSmoother.
Definition at line 107 of file ConcurrentBatchSmoother.cpp.
|
overridevirtual |
Implement a GTSAM standard 'print' function
Implements gtsam::ConcurrentSmoother.
Definition at line 28 of file ConcurrentBatchSmoother.cpp.
|
staticprivate |
Print just the nonlinear keys in a linear factor
Definition at line 403 of file ConcurrentBatchSmoother.cpp.
|
staticprivate |
Print just the nonlinear keys in a nonlinear factor
Definition at line 385 of file ConcurrentBatchSmoother.cpp.
|
private |
Remove factors from the graph by slot index
slots | The slots in the factor graph that should be deleted |
Definition at line 214 of file ConcurrentBatchSmoother.cpp.
|
private |
Use colamd to update into an efficient ordering
Definition at line 232 of file ConcurrentBatchSmoother.cpp.
|
overridevirtual |
Apply the new smoother factors sent by the filter, and the updated version of the filter branch summarized factors.
smootherFactors | A set of new factors added to the smoother from the filter |
smootherValues | Linearization points for any new variables |
summarizedFactors | An updated version of the filter branch summarized factors |
rootValues | The linearization point of the root variables |
Implements gtsam::ConcurrentSmoother.
Definition at line 129 of file ConcurrentBatchSmoother.cpp.
|
virtual |
Add new factors and variables to the smoother.
Add new measurements, and optionally new variables, to the smoother. This runs a full step of the ISAM2 algorithm, relinearizing and updating the solution as needed, according to the wildfire and relinearize thresholds.
newFactors | The new factors to be added to the smoother |
newTheta | Initialization points for new variables to be added to the smoother You must include here all new variables occuring in newFactors (which were not already in the smoother). There must not be any variables here that do not occur in newFactors, and additionally, variables that were already in the system must not be included here. |
Definition at line 49 of file ConcurrentBatchSmoother.cpp.
|
private |
Calculate the smoother marginal factors on the separator variables
Definition at line 364 of file ConcurrentBatchSmoother.cpp.
|
protected |
The set of available factor graph slots caused by deleting factors.
Definition at line 163 of file ConcurrentBatchSmoother.h.
|
protected |
The current set of linear deltas from the linearization point.
Definition at line 161 of file ConcurrentBatchSmoother.h.
|
protected |
The set of all factors currently in the smoother.
Definition at line 158 of file ConcurrentBatchSmoother.h.
|
protected |
The slots in factor graph that correspond to the current filter summarization factors.
Definition at line 165 of file ConcurrentBatchSmoother.h.
|
protected |
The current ordering used to calculate the linear deltas.
Definition at line 160 of file ConcurrentBatchSmoother.h.
|
protected |
LM parameters.
Definition at line 157 of file ConcurrentBatchSmoother.h.
|
protected |
The linearization points of the separator variables. These should not be updated during optimization.
Definition at line 164 of file ConcurrentBatchSmoother.h.
|
protected |
A temporary holding place for calculated smoother summarization.
Definition at line 168 of file ConcurrentBatchSmoother.h.
|
protected |
Current linearization point of all variables in the smoother.
Definition at line 159 of file ConcurrentBatchSmoother.h.
|
protected |
The current variable index, which allows efficient factor lookup by variable.
Definition at line 162 of file ConcurrentBatchSmoother.h.