Main MRPT website > C++ reference
MRPT logo
List of all members | Classes | Public Types | Public Attributes
mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree Struct Reference

Detailed Description

template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
struct mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree

Definition at line 499 of file srba_types.h.

#include <mrpt/srba/srba_types.h>

Classes

struct  TSpanningTreeSym
 The "symbolic" part of the spanning tree. More...
 

Public Types

typedef mrpt::utils::map_as_vector< TKeyFrameID, std::map< TKeyFrameID, TSpanTreeEntry >, std::deque< std::pair< TKeyFrameID, std::map< TKeyFrameID, TSpanTreeEntry > > > > next_edge_maps_t
 The definition seems complex but behaves just like: std::map< TKeyFrameID, std::map<TKeyFrameID,TSpanTreeEntry> > More...
 
typedef mrpt::utils::map_as_vector< TKeyFrameID, std::map< TKeyFrameID, k2k_edge_vector_t >, std::deque< std::pair< TKeyFrameID, std::map< TKeyFrameID, k2k_edge_vector_t > > > > all_edges_maps_t
 The definition seems complex but behaves just like: std::map< TKeyFrameID, std::map<TKeyFrameID, k2k_edge_vector_t> > More...
 

Public Member Functions

Spanning tree main operations
void clear ()
 Empty all sym & num data. More...
 
void update_symbolic_new_node (const TKeyFrameID new_node_id, const TPairKeyFrameID &new_edge, const topo_dist_t max_depth, const bool check_all_obs_are_connected=false, const new_kf_observations_t *obs=NULL)
 Incremental update of spanning trees after the insertion of ONE new node and ONE OR MORE edges. More...
 
size_t update_numeric (bool skip_marked_as_uptodate=false)
 Updates all the numeric SE(3) poses from ALL the sym.all_edges. More...
 
size_t update_numeric (const std::set< TKeyFrameID > &kfs_to_update, bool skip_marked_as_uptodate=false)
 idem, for the set of edges that have as "from" node any of the IDs in the passed set. More...
 
size_t update_numeric_only_all_from_node (const typename all_edges_maps_t::const_iterator &it, bool skip_marked_as_uptodate=false)
 Updates all the numeric SE(3) poses from a given entry from sym.all_edges[i]. More...
 
Spanning tree misc. operations
void dump_as_text (std::string &s) const
 Useful for debugging. More...
 
bool dump_as_text_to_file (const std::string &sFileName) const
 Useful for debugging. More...
 
bool save_as_dot_file (const std::string &sFileName, const std::vector< TKeyFrameID > &kf_roots_to_save=std::vector< TKeyFrameID >()) const
 Saves all (or a subset of all) the spanning trees If kf_roots_to_save is left empty, all STs are saved. More...
 
void get_stats (size_t &num_nodes_min, size_t &num_nodes_max, double &num_nodes_mean, double &num_nodes_std) const
 Returns min/max and mean/std stats on the number of nodes found on all the spanning trees. More...
 

Public Attributes

const TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS > * m_parent
 
Data structures
struct mrpt::srba::TRBA_Problem_state::TSpanningTree::TSpanningTreeSym sym
 
kf2kf_pose_traits< KF2KF_POSE_TYPE >::TRelativePosesForEachTarget num
 "Numeric" spanning tree: the SE(3) pose of each node wrt to any other: num[SOURCE] |–> map[TARGET] = CPose3D of TARGET as seen from SOURCE (typ: SOURCE is the observing KF, TARGET is the reference base of the observed landmark) More...
 

Member Typedef Documentation

template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
typedef mrpt::utils::map_as_vector< TKeyFrameID, std::map<TKeyFrameID, k2k_edge_vector_t>, std::deque<std::pair<TKeyFrameID,std::map<TKeyFrameID, k2k_edge_vector_t > > > > mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::all_edges_maps_t

The definition seems complex but behaves just like: std::map< TKeyFrameID, std::map<TKeyFrameID, k2k_edge_vector_t> >

Definition at line 513 of file srba_types.h.

template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
typedef mrpt::utils::map_as_vector< TKeyFrameID, std::map<TKeyFrameID,TSpanTreeEntry>, std::deque<std::pair<TKeyFrameID,std::map<TKeyFrameID,TSpanTreeEntry> > > > mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::next_edge_maps_t

The definition seems complex but behaves just like: std::map< TKeyFrameID, std::map<TKeyFrameID,TSpanTreeEntry> >

Definition at line 506 of file srba_types.h.

Member Function Documentation

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
void mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::clear ( void  )
template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
void mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::dump_as_text ( std::string &  s) const

Useful for debugging.

Definition at line 28 of file spantree_misc.h.

References mrpt::format(), and mrpt::mrpt::format().

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
bool mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::dump_as_text_to_file ( const std::string &  sFileName) const
template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
void mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::get_stats ( size_t &  num_nodes_min,
size_t &  num_nodes_max,
double &  num_nodes_mean,
double &  num_nodes_std 
) const

Returns min/max and mean/std stats on the number of nodes found on all the spanning trees.

Runs in O(N), N=number of keyframes.

Definition at line 258 of file spantree_misc.h.

References mrpt::math::meanAndStd(), and mrpt::math::minimum_maximum().

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
bool mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::save_as_dot_file ( const std::string &  sFileName,
const std::vector< TKeyFrameID > &  kf_roots_to_save = std::vector<TKeyFrameID>() 
) const

Saves all (or a subset of all) the spanning trees If kf_roots_to_save is left empty, all STs are saved.

Otherwise, only those with the given roots.

Returns
false on error

Definition at line 122 of file spantree_misc.h.

References ASSERT_, mrpt::format(), and mrpt::mrpt::format().

Referenced by mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_symbolic_new_node().

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
size_t mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_numeric ( bool  skip_marked_as_uptodate = false)

Updates all the numeric SE(3) poses from ALL the sym.all_edges.

Returns
The number of updated poses.

Definition at line 99 of file spantree_update_numeric.h.

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
size_t mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_numeric ( const std::set< TKeyFrameID > &  kfs_to_update,
bool  skip_marked_as_uptodate = false 
)

idem, for the set of edges that have as "from" node any of the IDs in the passed set.

Definition at line 111 of file spantree_update_numeric.h.

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
size_t mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_numeric_only_all_from_node ( const typename all_edges_maps_t::const_iterator it,
bool  skip_marked_as_uptodate = false 
)

Updates all the numeric SE(3) poses from a given entry from sym.all_edges[i].

Returns
The number of updated poses.

Definition at line 19 of file spantree_update_numeric.h.

References mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::num.

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
void mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_symbolic_new_node ( const TKeyFrameID  new_node_id,
const TPairKeyFrameID new_edge,
const topo_dist_t  max_depth,
const bool  check_all_obs_are_connected = false,
const new_kf_observations_t obs = NULL 
)

Member Data Documentation

template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
const TRBA_Problem_state<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>* mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::m_parent
template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
kf2kf_pose_traits<KF2KF_POSE_TYPE>::TRelativePosesForEachTarget mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::num

"Numeric" spanning tree: the SE(3) pose of each node wrt to any other: num[SOURCE] |–> map[TARGET] = CPose3D of TARGET as seen from SOURCE (typ: SOURCE is the observing KF, TARGET is the reference base of the observed landmark)

Numeric poses are valid after calling update_numeric()

NOTE: Both symmetric poses, e.g. (i,j) and also (j,i), are stored for convenience of being able to get references/pointers to them.

Definition at line 550 of file srba_types.h.

Referenced by mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::clear(), and mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::update_numeric_only_all_from_node().

template<class KF2KF_POSE_TYPE, class LM_TYPE, class OBS_TYPE, class RBA_OPTIONS>
struct mrpt::srba::TRBA_Problem_state::TSpanningTree::TSpanningTreeSym mrpt::srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::TSpanningTree::sym



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.0 SVN: at Sun Sep 13 03:55:12 UTC 2015