Public Member Functions | Private Attributes | List of all members
solver_plugins::GTSAMSolver Class Reference

Wrapper for G2O to interface with Open Karto. More...

#include <GTSAM_solver.hpp>

Inheritance diagram for solver_plugins::GTSAMSolver:
Inheritance graph
[legend]

Public Member Functions

virtual void AddConstraint (karto::Edge< karto::LocalizedRangeScan > *pEdge)
 Add an edge constraint to pose-graph. More...
 
virtual void AddNode (karto::Vertex< karto::LocalizedRangeScan > *pVertex)
 Add a node to pose-graph. More...
 
virtual void Clear ()
 Clear the vector of corrections. More...
 
virtual void Compute ()
 Solve the SLAM back-end. More...
 
virtual const karto::ScanSolver::IdPoseVectorGetCorrections () const
 Get the vector of corrections. More...
 
virtual void getGraph (std::vector< Eigen::Vector2d > &nodes)
 Get the pose-graph. More...
 
 GTSAMSolver ()
 
virtual void ModifyNode (const int &unique_id, const Eigen::Vector3d &pose)
 
virtual ~GTSAMSolver ()
 
- Public Member Functions inherited from karto::ScanSolver
virtual std::unordered_map< int, Eigen::Vector3d > * getGraph ()
 
virtual void GetNodeOrientation (const int &unique_id, double &pose)
 
virtual void ModifyNode (const int &unique_id, Eigen::Vector3d pose)
 
virtual void RemoveConstraint (kt_int32s, kt_int32s)
 
virtual void RemoveNode (kt_int32s)
 
virtual void Reset ()
 
 ScanSolver ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
virtual ~ScanSolver ()
 

Private Attributes

karto::ScanSolver::IdPoseVector corrections_
 
gtsam::NonlinearFactorGraph graph_
 
std::vector< Eigen::Vector2d > graphNodes_
 
gtsam::Values initialGuess_
 

Additional Inherited Members

- Public Types inherited from karto::ScanSolver
typedef std::vector< std::pair< kt_int32s, Pose2 > > IdPoseVector
 

Detailed Description

Wrapper for G2O to interface with Open Karto.

Definition at line 27 of file GTSAM_solver.hpp.

Constructor & Destructor Documentation

◆ GTSAMSolver()

solver_plugins::GTSAMSolver::GTSAMSolver ( )

Definition at line 23 of file GTSAM_solver.cpp.

◆ ~GTSAMSolver()

solver_plugins::GTSAMSolver::~GTSAMSolver ( )
virtual

Definition at line 37 of file GTSAM_solver.cpp.

Member Function Documentation

◆ AddConstraint()

void solver_plugins::GTSAMSolver::AddConstraint ( karto::Edge< karto::LocalizedRangeScan > *  pEdge)
virtual

Add an edge constraint to pose-graph.

Adds a relative pose measurement constraint between two poses in the graph

Parameters
pEdge[description]

Reimplemented from karto::ScanSolver.

Definition at line 115 of file GTSAM_solver.cpp.

◆ AddNode()

void solver_plugins::GTSAMSolver::AddNode ( karto::Vertex< karto::LocalizedRangeScan > *  pVertex)
virtual

Add a node to pose-graph.

Add a node which is a robot pose to the pose-graph

Parameters
pVertexthe node to be added in

Reimplemented from karto::ScanSolver.

Definition at line 98 of file GTSAM_solver.cpp.

◆ Clear()

void solver_plugins::GTSAMSolver::Clear ( )
virtual

Clear the vector of corrections.

Empty out previously computed corrections

Reimplemented from karto::ScanSolver.

Definition at line 44 of file GTSAM_solver.cpp.

◆ Compute()

void solver_plugins::GTSAMSolver::Compute ( )
virtual

Solve the SLAM back-end.

Calls G2O to solve the SLAM back-end

Implements karto::ScanSolver.

Definition at line 58 of file GTSAM_solver.cpp.

◆ GetCorrections()

const karto::ScanSolver::IdPoseVector & solver_plugins::GTSAMSolver::GetCorrections ( ) const
virtual

Get the vector of corrections.

Get the vector of corrections

Returns
Vector with corrected poses

Implements karto::ScanSolver.

Definition at line 51 of file GTSAM_solver.cpp.

◆ getGraph()

void solver_plugins::GTSAMSolver::getGraph ( std::vector< Eigen::Vector2d > &  nodes)
virtual

Get the pose-graph.

Get the underlying graph from g2o, return the graph of constraints

Parameters
gthe graph

Definition at line 160 of file GTSAM_solver.cpp.

◆ ModifyNode()

virtual void solver_plugins::GTSAMSolver::ModifyNode ( const int &  unique_id,
const Eigen::Vector3d &  pose 
)
virtual

Member Data Documentation

◆ corrections_

karto::ScanSolver::IdPoseVector solver_plugins::GTSAMSolver::corrections_
private

Definition at line 84 of file GTSAM_solver.hpp.

◆ graph_

gtsam::NonlinearFactorGraph solver_plugins::GTSAMSolver::graph_
private

Definition at line 85 of file GTSAM_solver.hpp.

◆ graphNodes_

std::vector<Eigen::Vector2d> solver_plugins::GTSAMSolver::graphNodes_
private

Definition at line 87 of file GTSAM_solver.hpp.

◆ initialGuess_

gtsam::Values solver_plugins::GTSAMSolver::initialGuess_
private

Definition at line 86 of file GTSAM_solver.hpp.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Mon Feb 28 2022 23:46:50