SRBA: Sparser Relative Bundle Adjustment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Types | Public Member Functions
srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS > Struct Template Reference

Detailed Description

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
struct srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >

All the important data of a RBA problem at any given instant of time Operations on this structure are performed via the public API of srba::RbaEngine

See also:
RbaEngine

Definition at line 549 of file srba_types.h.

#include <srba_types.h>

List of all members.

Classes

struct  TLinearSystem
struct  TSpanningTree

Public Types

typedef kf2kf_pose_t::pose_t pose_t
typedef kf2kf_pose_traits
< kf2kf_pose_t >::k2k_edge_t 
k2k_edge_t
typedef kf2kf_pose_traits
< kf2kf_pose_t >
::k2k_edge_vector_t 
k2k_edge_vector_t
typedef kf2kf_pose_traits
< kf2kf_pose_t >
::frameid2pose_map_t 
frameid2pose_map_t
typedef kf2kf_pose_traits
< kf2kf_pose_t >::pose_flag_t 
pose_flag_t
typedef landmark_traits
< landmark_t >
::TRelativeLandmarkPosMap 
TRelativeLandmarkPosMap
typedef landmark_traits
< landmark_t >::TLandmarkEntry 
TLandmarkEntry
typedef hessian_traits
< kf2kf_pose_t, landmark_t,
obs_t >::landmarks2infmatrix_t 
landmarks2infmatrix_t
typedef
rba_joint_parameterization_traits_t
< kf2kf_pose_t, landmark_t,
obs_t >::keyframe_info 
keyframe_info
typedef
rba_joint_parameterization_traits_t
< kf2kf_pose_t, landmark_t,
obs_t >::k2f_edge_t 
k2f_edge_t
typedef
rba_joint_parameterization_traits_t
< kf2kf_pose_t, landmark_t,
obs_t >::new_kf_observations_t 
new_kf_observations_t
typedef
rba_joint_parameterization_traits_t
< kf2kf_pose_t, landmark_t,
obs_t >::new_kf_observation_t 
new_kf_observation_t
typedef
mrpt::aligned_containers
< k2k_edge_t >::deque_t 
k2k_edges_deque_t
typedef
mrpt::aligned_containers
< k2f_edge_t >::deque_t 
all_observations_deque_t
typedef std::deque< keyframe_infokeyframe_vector_t
 Index are "TKeyFrameID" IDs. There's no NEED to make this a deque<> for preservation of references, but is an efficiency improvement.

Public Member Functions

void clear ()
 TRBA_Problem_state ()
bool find_path_bfs (const TKeyFrameID from, const TKeyFrameID to, std::vector< TKeyFrameID > *out_path_IDs, typename kf2kf_pose_traits< kf2kf_pose_t >::k2k_edge_vector_t *out_path_edges=NULL) const
void compute_all_node_degrees (double &out_mean_degree, double &out_std_degree, double &out_max_degree) const
bool are_keyframes_connected (const TKeyFrameID id1, const TKeyFrameID id2) const
size_t alloc_kf2kf_edge (const TPairKeyFrameID &ids, const pose_t &init_inv_pose_val=pose_t())

Public Attributes

Data
keyframe_vector_t keyframes
 All key frames (global poses are not included in an RBA problem). Vector indices are "TKeyFrameID" IDs.
k2k_edges_deque_t k2k_edges
 (unknowns) All keyframe-to-keyframe edges
TRelativeLandmarkPosMap unknown_lms
 (unknown values) Landmarks with an unknown fixed 3D position relative to their base frame_id
landmarks2infmatrix_t unknown_lms_inf_matrices
 Information matrices that model the uncertainty in each XYZ position for the unknown LMs - these matrices should be already scaled according to the camera noise in pixel standard deviations.
TRelativeLandmarkPosMap known_lms
 (known values) Landmarks with a known, fixed 3D position relative to their base frame_id
mrpt::aligned_containers
< TLandmarkEntry >::deque_t 
all_lms
TSpanningTree spanning_tree
all_observations_deque_t all_observations
 All raw observation data (k2f edges)
TLinearSystem lin_system
 The sparse linear system of equations.
std::deque< char > all_observations_Jacob_validity
std::set< size_t > last_timestep_touched_kfs

Constructor & Destructor Documentation

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >::TRBA_Problem_state ( ) [inline]

Ctor

Definition at line 743 of file srba_types.h.


Member Function Documentation

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
size_t srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::alloc_kf2kf_edge ( const TPairKeyFrameID &  ids,
const pose_t &  init_inv_pose_val = pose_t() 
)

Creates a new kf2kf edge variable. Called from create_kf2kf_edge()

Parameters:
[in]init_inv_pose_valThe initial value for the inverse pose stored in edge first->second, i.e. the pose of first wrt. second.
Returns:
The ID of the new kf2kf edge, which coincides with the 0-based index of the new entry in "rba_state.k2k_edges"
Note:
Runs in O(1)

Definition at line 17 of file alloc_kf2kf_edge.h.

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
bool srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::are_keyframes_connected ( const TKeyFrameID  id1,
const TKeyFrameID  id2 
) const

Returns true if the pair of KFs are connected thru a kf2kf edge, no matter the direction of the edge. Runs in worst-case O(D) with D the degree of the KF graph (that is, the maximum number of edges adjacent to one KF)

Definition at line 123 of file rba_problem_common.h.

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
void srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >::clear ( void  ) [inline]

Empties all members

Definition at line 729 of file srba_types.h.

template<class KF2KF_POSE_TYPE , class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
void srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::compute_all_node_degrees ( double &  out_mean_degree,
double &  out_std_degree,
double &  out_max_degree 
) const

Computes stats on the degree (# of adjacent nodes) of all the nodes in the graph. Runs in O(N) with N=# of keyframes

Definition at line 98 of file rba_problem_common.h.

template<class KF2KF_POSE_TYPE, class LM_TYPE , class OBS_TYPE , class RBA_OPTIONS >
bool srba::TRBA_Problem_state< KF2KF_POSE_TYPE, LM_TYPE, OBS_TYPE, RBA_OPTIONS >::find_path_bfs ( const TKeyFrameID  from,
const TKeyFrameID  to,
std::vector< TKeyFrameID > *  out_path_IDs,
typename kf2kf_pose_traits< KF2KF_POSE_TYPE >::k2k_edge_vector_t *  out_path_edges = NULL 
) const

Auxiliary, brute force (BFS) method for finding the shortest path between any two Keyframes. Use only when the distance between nodes can be larger than the maximum depth of incrementally-built spanning trees

Parameters:
[in,out]out_path_IDs(Ignored if ==NULL) Just leave this vector uninitialized at input, it'll be automatically initialized to the right size and values.
[in,out]out_path_edges(Ignored if ==NULL) Just like out_path_IDs, but here you'll receive the list of traversed edges, instead of the IDs of the visited KFs.
Returns:
false if no path was found.

Definition at line 227 of file spantree_update_symbolic.h.


Member Data Documentation

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
mrpt::aligned_containers<TLandmarkEntry>::deque_t srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >::all_lms

Index (by feat ID) of ALL landmarks stored in unknown_lms and known_lms. Note that if gaps occur in the observed feature IDs, some pointers here will be NULL and some mem will be wasted, but in turn we have a O(1) search mechanism for all LMs.

Definition at line 711 of file srba_types.h.

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
std::deque<char> srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >::all_observations_Jacob_validity

Its size grows simultaneously to all_observations, its values are updated during optimization to reflect invalid conditions in some Jacobians so we can completely discard their information while building the Hessian.

Note:
Kept as deque so we can have references to this.

Definition at line 722 of file srba_types.h.

template<class kf2kf_pose_t, class landmark_t, class obs_t, class RBA_OPTIONS>
std::set<size_t> srba::TRBA_Problem_state< kf2kf_pose_t, landmark_t, obs_t, RBA_OPTIONS >::last_timestep_touched_kfs

List of KFs touched by new KF2KF edges in the previous timesteps. Used in determine_kf2kf_edges_to_create() to bootstrap initial relative poses.

Definition at line 725 of file srba_types.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends