12 namespace mrpt {
namespace srba {
16 #define UPDATE_NUM_ST_VERBOSE 0
17 #define DEBUG_GARBAGE_FILL_ALL_NUMS 0
20 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
23 bool skip_marked_as_uptodate)
36 if (skip_marked_as_uptodate && i2j.updated && j2i.updated)
46 #if UPDATE_NUM_ST_VERBOSE
47 std::cout <<
"ST.NUM["<<id_from<<
"]["<<id_to<<
"] : ";
49 for (
size_t k=0;k<ev.size();k++)
53 accum.composeFrom(accum, ev[k]->inv_pose );
55 #if UPDATE_NUM_ST_VERBOSE
56 std::cout <<
"->"<<curKF;
61 accum.composeFrom(accum, -ev[k]->inv_pose );
63 #if UPDATE_NUM_ST_VERBOSE
64 std::cout <<
"<-"<<curKF;
77 #if UPDATE_NUM_ST_VERBOSE
78 std::cout <<
" "<< accum.asString() << std::endl;
82 return it->second.size();
85 #if DEBUG_GARBAGE_FILL_ALL_NUMS
87 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
95 it2->second.pose.setToNaN();
100 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
103 #if DEBUG_GARBAGE_FILL_ALL_NUMS
104 setAllNumericToGarbage<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>(*this);
106 size_t pose_count = 0;
108 pose_count += update_numeric_only_all_from_node(it, skip_marked_as_uptodate);
112 template <
class KF2KF_POSE_TYPE,
class LM_TYPE,
class OBS_TYPE,
class RBA_OPTIONS>
115 #if DEBUG_GARBAGE_FILL_ALL_NUMS
116 setAllNumericToGarbage<KF2KF_POSE_TYPE,LM_TYPE,OBS_TYPE,RBA_OPTIONS>(*this);
119 size_t pose_count = 0;
123 if (it_edge!=sym.all_edges.end())
125 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)