Monitoring Localization/Loop Closure Detection

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Monitoring Localization/Loop Closure Detection

Kameel Amareen
Hello and thank you for the optimized and great pipeline.

I would like to understand how could one monitor when a loop closure was detected when in localization mode from ros topics , or how to expose it if not already implemented ?

As the only way I see it currently is by monitoring the localization_pose topic for sudden jumps in the position.

Your feedback is highly appreciated :)
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Localization/Loop Closure Detection

matlabbe
Administrator
In rtabmap_msgs/Info (/rtabmap/info) msg, you can see these fields:
int32 loopClosureId
int32 proximityDetectionId
int32 landmarkId

geometry_msgs/Transform loopClosureTransform
"loopClosureTransform" would be not null (quaternion won't be all zeros) if a re-localization happened. You can also check for "loopClosureId!=0 OR proximityDetectionId!=0 OR landmarkId!=0".

Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Localization/Loop Closure Detection

Kameel Amareen
Thank you for your kind reply !

I would like to have a confidence score for the LC detection, how can one already extract the one calculated from RTABmap (the Bayesian filter probability if I am not mistaken) ?

And is there a method to extract all/any of:
1) Visual Features
2) RGB Image
3) Depth Image/Point Cloud

Of the Keyframe with which a loop closure detection was detected ? And if not readily available, any hints on how it can be exposed ?

Thanking you in advance and wishing you all the best
Reply | Threaded
Open this post in threaded view
|

Re: Monitoring Localization/Loop Closure Detection

matlabbe
Administrator
Hi,

In rtabmap_msgs/Info msgs, there are fields statsKeys and statsValues. It is a map<string, float> for plenty of statistics. Assuming you combined the dictionary statsKeys with statsValues and called it stats, you can get the loop closure probability with stats["Loop/Highest_hypothesis_value/"].

If you use rtabmap_viz, you can see the same statistics live under Statistics panel.

To get data of the loop closure, you may call ros service /rtabmap/get_node_data.

cheers,
Mathieu