12 namespace mrpt {
namespace srba {
14 #define UPDATE_NUM_ST_VERBOSE 0
15 #define DEBUG_GARBAGE_FILL_ALL_NUMS 0
18 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
21 bool skip_marked_as_uptodate)
34 if (skip_marked_as_uptodate && i2j.updated && j2i.updated)
44 #if UPDATE_NUM_ST_VERBOSE
45 std::cout <<
"ST.NUM["<<id_from<<
"]["<<id_to<<
"] : ";
47 for (
size_t k=0;k<ev.size();k++)
51 accum.composeFrom(accum, ev[k]->inv_pose );
53 #if UPDATE_NUM_ST_VERBOSE
54 std::cout <<
"->"<<curKF;
59 accum.composeFrom(accum, -ev[k]->inv_pose );
61 #if UPDATE_NUM_ST_VERBOSE
62 std::cout <<
"<-"<<curKF;
75 #if UPDATE_NUM_ST_VERBOSE
76 std::cout <<
" "<< accum.asString() << std::endl;
80 return it->second.size();
83 #if DEBUG_GARBAGE_FILL_ALL_NUMS
85 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
93 it2->second.pose.setToNaN();
98 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
101 #if DEBUG_GARBAGE_FILL_ALL_NUMS
102 setAllNumericToGarbage<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>(*this);
104 size_t pose_count = 0;
106 pose_count += update_numeric_only_all_from_node(it, skip_marked_as_uptodate);
110 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
113 #if DEBUG_GARBAGE_FILL_ALL_NUMS
114 setAllNumericToGarbage<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>(*this);
117 size_t pose_count = 0;
121 if (it_edge!=sym.all_edges.end())
123 pose_count += update_numeric_only_all_from_node(it_edge, skip_marked_as_uptodate);
kf2kf_pose_traits< KF2KF_POSE_TYPE >::pose_flag_t pose_flag_t
kf2kf_pose_traits< KF2KF_POSE_TYPE >::frameid2pose_map_t frameid2pose_map_t
vec_t::const_iterator const_iterator
kf2kf_pose_traits< KF2KF_POSE_TYPE >::k2k_edge_vector_t k2k_edge_vector_t
const Scalar * const_iterator
The argument "POSE_TRAITS" can be any of those defined in srba/models/kf2kf_poses.h (typically, either kf2kf_poses::SE3 or kf2kf_poses::SE2).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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].
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] =...
size_t update_numeric(bool skip_marked_as_uptodate=false)
Updates all the numeric SE(3) poses from ALL the sym.all_edges.
KF2KF_POSE_TYPE::pose_t pose_t
uint64_t TKeyFrameID
Numeric IDs for key-frames (KFs)