Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #pragma once
00011
00012 namespace mrpt { namespace graphslam { namespace deciders {
00013
00014
00015 template<class GRAPH_T>
00016 CLoopCloserERD_MR<GRAPH_T>::CLoopCloserERD_MR() {
00017
00018
00019
00020
00021 this->m_override_registered_nodes_check = true;
00022
00023 this->initializeLoggers("CLoopCloserERD_MR");
00024 }
00025
00026 template<class GRAPH_T>
00027 void CLoopCloserERD_MR<GRAPH_T>::addBatchOfNodeIDsAndScans(
00028 const std::map<
00029 TNodeID,
00030 mrpt::obs::CObservation2DRangeScan::Ptr>& nodeIDs_to_scans2D) {
00031 mr_parent_t::addBatchOfNodeIDsAndScans(nodeIDs_to_scans2D);
00032
00033 this->updateMapPartitions( true,
00034 false);
00035
00036 }
00037
00038 template<class GRAPH_T>
00039 void CLoopCloserERD_MR<GRAPH_T>::addScanMatchingEdges(
00040 TNodeID curr_nodeID) {
00041 MRPT_START;
00042
00043
00044
00045 bool is_own = this->m_engine->isOwnNodeID(curr_nodeID);
00046 if (is_own) {
00047 lc_parent_t::addScanMatchingEdges(curr_nodeID);
00048 }
00049
00050 MRPT_END;
00051 }
00052
00053 template<class GRAPH_T>
00054 void CLoopCloserERD_MR<GRAPH_T>::fetchNodeIDsForScanMatching(
00055 const TNodeID& curr_nodeID,
00056 std::set<TNodeID>* nodes_set) {
00057 ASSERT_(nodes_set);
00058
00059 size_t fetched_nodeIDs = 0;
00060 for (int nodeID_i = static_cast<int>(curr_nodeID)-1;
00061 (fetched_nodeIDs <= static_cast<size_t>(this->m_laser_params.prev_nodes_for_ICP) &&
00062 nodeID_i >= 0);
00063 --nodeID_i) {
00064 if (this->m_engine->isOwnNodeID(nodeID_i)) {
00065 nodes_set->insert(nodeID_i);
00066 fetched_nodeIDs++;
00067 }
00068 }
00069 }
00070
00071
00072 template<class GRAPH_T>
00073 bool CLoopCloserERD_MR<GRAPH_T>::updateState(
00074 mrpt::obs::CActionCollection::Ptr action,
00075 mrpt::obs::CSensoryFrame::Ptr observations,
00076 mrpt::obs::CObservation::Ptr observation ) {
00077
00078 bool success = lc_parent_t::updateState(action, observations, observation);
00079
00080
00081
00082
00083 return success;
00084 }
00085
00086
00087 } } }
00088