MROB
Public Types | Public Member Functions | Protected Attributes | List of all members
mrob::Node Class Referenceabstract

#include <node.hpp>

Inheritance diagram for mrob::Node:
Inheritance graph
[legend]

Public Types

enum  nodeMode { STANDARD = 0, ANCHOR, SCHUR_MARGI }
 

Public Member Functions

 Node (uint_t dim, nodeMode mode=STANDARD)
 
virtual void update (VectRefConst &dx)=0
 
virtual void update_from_auxiliary (VectRefConst &dx)=0
 
virtual void set_state (MatRefConst &x)=0
 
virtual void set_auxiliary_state (MatRefConst &x)=0
 
virtual const MatRefConst get_state () const =0
 
virtual MatRefConst get_auxiliary_state () const =0
 
virtual void print () const
 
factor_id_t get_id () const
 
void set_id (factor_id_t id)
 
factor_id_t get_dim (void) const
 
bool is_connected_to_EF () const
 
void set_connected_to_EF (bool state=true)
 
void set_node_mode (nodeMode mode)
 
nodeMode get_node_mode ()
 

Protected Attributes

factor_id_t id_
 
uint_t dim_
 
nodeMode node_mode_
 
bool isConnected2EF_
 

Detailed Description

Node class is an abstract class for creating future nodes. Pure abstract methods on get and set dimension is just a reminder that this is an Abstract class

Node does not track the factors associated to it, it just contains the state variables and allows to update its value. (whereas before we kept track of factors in an unnecessary complex solution).

States are indicated as references to MatX matrices, since it can be either a block vector or a matrix (transformation matrix)

For updates it will always be a block vector : Ref < MatX1 >

Two states are kept at the same time:

Node mode refer on how they will be processed further in the FGraph:

Member Function Documentation

◆ get_auxiliary_state()

virtual MatRefConst mrob::Node::get_auxiliary_state ( ) const
pure virtual

Returns a matrix to the last auxiliary state. This data structure is for the incre- metal implementation, or for error evaluation

Implemented in mrob::NodePose3d, mrob::NodePlane4d, mrob::NodeLandmark2d, mrob::NodePose2d, and mrob::NodeLandmark3d.

◆ get_state()

virtual const MatRefConst mrob::Node::get_state ( ) const
pure virtual

Declared as a dynamic matrix reference to allow any size to be returned. At run time returns a Reference to a fixed size matrix and provide it as an argument for the getState function, no need to be dynamic, as long as the dimension is correctly set

Implemented in mrob::NodePose3d, mrob::NodePlane4d, mrob::NodeLandmark2d, mrob::NodePose2d, and mrob::NodeLandmark3d.

◆ is_connected_to_EF()

bool mrob::Node::is_connected_to_EF ( ) const
inline

Methods for interacting with Eigen factors, a special kind of factors. This bool variable and its associated methods will make easier the construction of the matrix TODO not used right now, but it could to improve efficiency.

◆ set_auxiliary_state()

virtual void mrob::Node::set_auxiliary_state ( MatRefConst &  x)
pure virtual

◆ set_state()

virtual void mrob::Node::set_state ( MatRefConst &  x)
pure virtual

At run time sets the new value of the estate and auxiliary to be x

Implemented in mrob::NodePose3d, mrob::NodePlane4d, mrob::NodeLandmark2d, mrob::NodePose2d, and mrob::NodeLandmark3d.

◆ update()

virtual void mrob::Node::update ( VectRefConst &  dx)
pure virtual

The update function, given any block vector it updates the value of the state (principal).

Since we don't know the size at compilation, we declare a dynamic matrix, but on run-time we would like to use a fixed block matrix, and this virtual function will handle it nicely.

Implemented in mrob::NodePose3d, mrob::NodePlane4d, mrob::NodeLandmark2d, mrob::NodePose2d, and mrob::NodeLandmark3d.

◆ update_from_auxiliary()

virtual void mrob::Node::update_from_auxiliary ( VectRefConst &  dx)
pure virtual

Updates FROM the auxiliary state the principal state.

Implemented in mrob::NodePose3d, mrob::NodePlane4d, mrob::NodeLandmark2d, mrob::NodePose2d, and mrob::NodeLandmark3d.

Member Data Documentation

◆ isConnected2EF_

bool mrob::Node::isConnected2EF_
protected

On this pure abstract class we can't define a vector state, but we will return and process Ref<> to dynamic matrices. The reason for doing that is polymorphism. We prefer to preserve polymorphism for node storage at the cost of a returning Ref, although there is no extra allocation on this process. For instance, we will declare: Mat61 x_; or SE3 T_; (for transformations)


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