Open zjrob opened 5 years ago
Hello!
It all depend on which paper you want to reproduce. The most recent method (and the one I advise you to use) doesn't have any "links" between the maps. Instead it localizes the robot in the prior map and use the localization and its covariance to find corresponding corners. Then, an edge is added between the robot poses that observed the corner in the environment and the prior map corner corresponding to that corner. Hence, the function you're interested in is void addObservationMCLToPrior(const g2o::VertexLandmarkNDT* landmark);
Hence the method createNewLinks() isn't used in AutoCompleteGraphLocalization but only in the old method AutoCompleteGraph. the fact that is still in AutoCompleteGraphLocalization is an artifact of me researching what the next steps in the algorithm would be (and then realising that Links were ot that useful)
Functions (int) AutoCompleteGraphLocalization::createNewLinks() and (inline void) AutoCompleteGraphBase::updateLinks() has been fully commented inside the source code.
A member function (int) createNewLinks() of class AutoCompleteGraph calls addLinkBetweenMaps(vec, it_prior, it) . Then only one function with the same name AutoCompleteGraphLocalization::addLinkBetweenMaps() can be found, which tells "Those links are not usable anymore in Localization. Use AutoCompleteGraph for that".
The member function createNewLinks() of class AutoCompleteGraph is only called by (virtual void) updateLinks(), a member function of class AutoCompleteGraphFeature inherited from class AutoCompleteGraph. Yet the only call to updateLinks() is commented inside its caller AutoCompleteGraphLocalization::addNDTGraph().
The Auto-Complete Graph paper is scientifically solid and the source is well organized. Hope these tiny puzzles can soon be resolved.