Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
ISAM2Optimizer Class Reference

ISAM2 optimizer for graph SLAM. More...

#include <isam2_optimizer.hpp>

Inheritance diagram for ISAM2Optimizer:
Inheritance graph
Collaboration diagram for ISAM2Optimizer:
Collaboration graph

Public Member Functions

 ISAM2Optimizer (const SLAMParameters &params)
 
 ISAM2Optimizer (const ISAM2Optimizer &other)
 
ISAM2Optimizeroperator= (const ISAM2Optimizer &other)
 
 ~ISAM2Optimizer () override=default
 
std::shared_ptr< BaseOptimizerclone () const
 Clone the optimizer.
 
gtsam::Values optimize (gtsam::NonlinearFactorGraph &factor_graph, gtsam::Values &graph_values, unsigned int pose_num, unsigned int landmark_num) override
 Optimize the graph.
 
- Public Member Functions inherited from BaseOptimizer
 BaseOptimizer (const SLAMParameters &params)
 
 BaseOptimizer (const BaseOptimizer &other)
 
BaseOptimizeroperator= (const BaseOptimizer &other)
 
virtual ~BaseOptimizer ()=default
 

Private Attributes

gtsam::ISAM2 _isam2_
 
gtsam::Values _last_estimate_
 
gtsam::Values _new_values_
 
gtsam::NonlinearFactorGraph _new_factors_
 

Friends

class GraphSLAMInstance
 

Additional Inherited Members

- Protected Attributes inherited from BaseOptimizer
const SLAMParameters_params_
 

Detailed Description

ISAM2 optimizer for graph SLAM.

This class implements the ISAM2 optimizer for graph SLAM It uses the GTSAM ISAM2 implementation to optimize the factor graph incrementally

Definition at line 17 of file isam2_optimizer.hpp.

Constructor & Destructor Documentation

◆ ISAM2Optimizer() [1/2]

ISAM2Optimizer::ISAM2Optimizer ( const SLAMParameters params)

Definition at line 18 of file isam2_optimizer.cpp.

◆ ISAM2Optimizer() [2/2]

ISAM2Optimizer::ISAM2Optimizer ( const ISAM2Optimizer other)

Definition at line 31 of file isam2_optimizer.cpp.

◆ ~ISAM2Optimizer()

ISAM2Optimizer::~ISAM2Optimizer ( )
overridedefault

Member Function Documentation

◆ clone()

std::shared_ptr< BaseOptimizer > ISAM2Optimizer::clone ( ) const
virtual

Clone the optimizer.

This method is used to create a copy of the optimizer It is useful for polymorphic classes that use pointers to base class

Returns
A shared pointer to the cloned optimizer

Implements BaseOptimizer.

Definition at line 51 of file isam2_optimizer.cpp.

◆ operator=()

ISAM2Optimizer & ISAM2Optimizer::operator= ( const ISAM2Optimizer other)

Definition at line 38 of file isam2_optimizer.cpp.

Here is the call graph for this function:

◆ optimize()

gtsam::Values ISAM2Optimizer::optimize ( gtsam::NonlinearFactorGraph &  factor_graph,
gtsam::Values &  graph_values,
unsigned int  pose_num,
unsigned int  landmark_num 
)
overridevirtual

Optimize the graph.

This method is used to run the optimization on the graph It also updates the pose and the graph values accordingly afterwards It may change the factor graph ISAM2 optimization is incremental, so it uses its own graph and values to optimize TODO: improve this architecture to avoid confusion

Parameters
factor_graphThe factor graph to optimize
graph_valuesThe values to optimize
pose_numThe number of poses in the graph
landmark_numThe number of landmarks in the graph
Returns
The optimized values

Implements BaseOptimizer.

Definition at line 55 of file isam2_optimizer.cpp.

Friends And Related Symbol Documentation

◆ GraphSLAMInstance

friend class GraphSLAMInstance
friend

Definition at line 57 of file isam2_optimizer.hpp.

Member Data Documentation

◆ _isam2_

gtsam::ISAM2 ISAM2Optimizer::_isam2_
private

Definition at line 18 of file isam2_optimizer.hpp.

◆ _last_estimate_

gtsam::Values ISAM2Optimizer::_last_estimate_
private

Definition at line 19 of file isam2_optimizer.hpp.

◆ _new_factors_

gtsam::NonlinearFactorGraph ISAM2Optimizer::_new_factors_
private

Definition at line 21 of file isam2_optimizer.hpp.

◆ _new_values_

gtsam::Values ISAM2Optimizer::_new_values_
private

Definition at line 20 of file isam2_optimizer.hpp.


The documentation for this class was generated from the following files: