47 resMsg->hypothesisID = LMH_ID;
49 for (
unsigned long newPoseID : newPoseIDs)
54 static_cast<unsigned>(newPoseID));
59 std::make_shared<CPose3DPDFParticles>();
66 auto itSFs = LMH->
m_SFs.find(newPoseID);
87 vector<std::vector<uint32_t>> partitions;
94 resMsg->partitions.resize(partitions.size());
95 vector<TPoseIDList>::iterator itDest;
96 vector<std::vector<uint32_t>>::const_iterator itSrc;
97 for (itDest = resMsg->partitions.begin(), itSrc = partitions.begin();
98 itSrc != partitions.end(); itSrc++, itDest++)
100 itDest->resize(itSrc->size());
101 std::vector<uint32_t>::const_iterator it1;
102 TPoseIDList::iterator it2;
103 for (it1 = itSrc->begin(), it2 = itDest->begin(); it1 != itSrc->end();
108 resMsg->dumpToConsole();
115 void CHMTSLAM::TMessageLSLAMfromAA::dumpToConsole()
const 118 "Hypo ID: %i has %i partitions:\n", (
int)hypothesisID,
119 (
int)partitions.size());
121 for (
const auto& partition : partitions)
void updatePartitions(std::vector< std::vector< uint32_t >> &partitions)
Recalculate the map/graph partitions.
TOptions options
Algorithm parameters.
THypothesisID m_ID
The unique ID of the hypothesis (Used for accessing mrpt::slam::CHierarchicalMHMap).
void logFmt(const VerbosityLevel level, const char *fmt,...) const MRPT_printf_format_check(3
Alternative logging method, which mimics the printf behavior.
std::string std::string format(std::string_view fmt, ARGS &&... args)
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
void printf_vector(const char *fmt, const std::vector< T > &V)
Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element...
uint32_t addMapFrame(const mrpt::obs::CSensoryFrame &frame, const mrpt::poses::CPose3DPDF &robotPose3D)
Insert a new keyframe to the graph.
An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).
mrpt::slam::CIncrementalMapPartitioner partitioner
std::vector< TPoseID > TPoseIDList
#define ASSERT_(f)
Defines an assertion mechanism.
std::map< uint32_t, TPoseID > idx2pose
For the poses in "partitioner".
This namespace contains representation of robot actions and observations.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
mrpt::hmtslam::CHMTSLAM::TOptions m_options
This class is used in HMT-SLAM to represent each of the Local Metric Hypotheses (LMHs).
std::mutex lock
CS to access the entire struct.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
struct mrpt::hmtslam::CLocalMetricHypothesis::TRobotPosesPartitioning m_robotPosesGraph
std::map< TPoseID, mrpt::obs::CSensoryFrame > m_SFs
The SF gathered at each robot pose.
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
mrpt::slam::CIncrementalMapPartitioner::TOptions AA_options
[AA] The options for the partitioning algorithm
mrpt::safe_ptr< CHMTSLAM > m_parent
For quick access to our parent object.
void getPoseParticles(const TPoseID &poseID, mrpt::poses::CPose3DPDFParticles &outPDF) const
Returns the mean and covariance of each robot pose in this LMH, as computed from the set of particles...