Closed alec-luterman closed 8 months ago
You could make an exact synchronizer to subscribe to both /rtabmap/info
and rtabmap/mapData
topics and access them in same callback. In MapInfo, you can know there was a loop closure if any of these fields is not 0:
int32 loopClosureId
int32 proximityDetectionId
int32 landmarkId
Thank you
Hello, I am trying to update the position of RViz markers that were placed on top of the map for detected objects when there is a loop closure, and I was wondering if there was a way to know if there was a loop closure from the map data callback instead of just recalculating the position of the markers during each callback in order to not perform unnecessary transforms. When I was trying to see potential ways to do this, it appears that checking if
msg->graph.links.size()
does not equal to +1 from the previous callback works visually and seems to correspond with loop closure based on the messages printed out in the terminal, but I am not sure if this is accurate. What is the best way to check for loop closure from the mapdata message? Thank you