RTAB-MAP with only 3D LIDAR and no loop closing

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

RTAB-MAP with only 3D LIDAR and no loop closing

Amber
Hi Mathieu,

I recently started using RTAB-MAP with ROS support with v0.20.9-melodic. My first issue is that when I run in the mapping mode, it does not use the Bayes filter to update the nodes. I created a few checkpoints to print, but they do not print because,  signature->isBadSignature()is not set false ever.

The loop closure is never detected and shows just like the one in the below image.

Following is the shared launch file that I am using.
https://drive.google.com/file/d/1DUIEUCgC8esZIaxRVT56EG0a4F-BmfUQ/view?usp=sharing

I also need your suggestion if this launch file is fine to get the desired results. If not, kindly suggest changes.



Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
Hi,

With lidar-only, the Bayes filter is not used (it is just for visual loop closure deteciton). There is no global LiDAR-based loop closure detection built-in in rtabmap, you may check this project: https://github.com/MarvinStuede/cmr_lidarloop

However, if odometry is not drifting too much, Proximity Detection could be triggered with only lidar. Do you have a database to share to see why procimity detections have not been detected?

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

Amber
This post was updated on .
Hi Matheu,

As you suggested, I tried implementing <nabble_embed>cmr_lidarloop</nabble_embed> with <nabble_embed>RTAB-Map</nabble_embed>. Separately, I performed with RTAB-MAP mapping without cmr_lidarloop in a gazebo simulation.  Please find the .db file in the link nelow.

https://drive.google.com/file/d/1wrd0N7lEhMyoRMBxDwzyQ79Lk2Avhqdx/view?usp=sharing

Also, let me know if you need the bag file. Additionally, I found that /rtabmap/MapData, /rtabmap/MapGraph, and /rtabmap/info are not publishing when only the LIDAR is used. Particularly,  /rtabmap/MapData is required while using cmr_lidarloop package.

Also, I saw that cmr_localization package which is linked with cmr_lidarloop uses RGBD and RGB cameras. Do they work without the cameras also? I am unable to publish scan_descriptor topic actually, while following the documentation of the cmr_lidarloop. The corresponding issues have been posted in the link below.
https://github.com/MarvinStuede/cmr_lidarloop/issues/4

Please let me know your views and suggestions to resolve it.

thank you,

Best,
Anindya
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
Hi, if mapData is not published, this means rtabmap is doing nothing. Do you have warnings in terminal telling that rtabmap didn't receive topics for 5 seconds?

The cmr_lidarloop package should work without camera. On their system, they had cameras that were also fed to rtabmap, but external cmr_lidarloop only needed the scan_descriptor fed to rtabmap node and extracted back from mapData.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

Amber
This post was updated on .
Hi Matheu,

thank you for your response. I tried many bags over the last two weeks and got the mapdata publishing and cmr_lidarloop detecting loop closures with lidar only. However, to verify things are working I want to check if there is/are matching loop closures obtained using camera data (RTAB-Map) and lidar data (using cmr_lidarloop). While I set subscribe_scan_descriptor (true), can I keep subscribe_rgbd (true) at the same time? Can I identify these two kinds of loop closures distinctively in rtabmapviz?

warm regards,
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
Hi,

Yes, you can subscribe to both topics at the same time.

To distinguish loop closure types, we can set a type in Link msg:
https://github.com/introlab/rtabmap_ros/blob/2c144400ed496e5de6cca36b228e75f9a2d0b47f/msg/Link.msg#L12

In cmr_lidarloop, the link will have a type Link::kUserClosure: https://github.com/MarvinStuede/cmr_lidarloop/blob/39b44c1b4fe203fa89319820f25b12d428dfabe2/src/lidar_loopdetection.cpp#L291

Loop closures detected with camera will appear as Link::GlobalClosure, all types are there: https://github.com/introlab/rtabmap/blob/aee034c5ed9d1909a976d1d4bb1a849eb26e1991/corelib/include/rtabmap/core/Link.h#L41-L56

In rtabmapviz, open Graph View, each kind of links can have a different color. Right-click on Graph-View panel to change them.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

Amber
Hi Matheu,

I still find issues related to subscribing rgbd_image and scan_descriptor simultaneously for cmr_lidarloop. Can you please check the attached launch files that I am using and help understanding if there is any problem with the same.

camera_lidar.launch
cmr_lidarloop.launch
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
Hi, you should set subscribe_rgbd to true to subscribe to rgbd_image. However, you are right, there was a bug when subscribing to scan_descriptor at the same time. I fixed the issue in this commit.

And for all the paramters not found warnings from rtabmapviz, either set rtabmap node name to "rtabmap" instead of "rtabmap_mapping" or add
<param name="rtabmap"     type="string"    value="rtabmap_mapping"/>
under rtabmapviz node.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

Amber
Hi Matheu,

It is not working in my system. When I launch the save_detector_data.launch, I get the following error.

[FATAL] [1638968435.476764729]: ASSERTION FAILED
        file = /home/drive/cmr_ws/src/cmr_lidarloop/src/save_data_for_detector.cpp
        line = 136
        cond = s.globalDescriptors().size() == 1

[cmr_lidarloop/save_data_for_detector-2] process has died [pid 4924, exit code -5, cmd /home/drive/cmr_ws/devel/lib/cmr_lidarloop/save_data_for_detector __name:=save_data_for_detector __log:=/home/drive/.ros/log/cc9515da-5826-11ec-a9b4-9c5c8e6e5977/cmr_lidarloop-save_data_for_detector-2.log].
log file: /home/drive/.ros/log/cc9515da-5826-11ec-a9b4-9c5c8e6e5977/cmr_lidarloop-save_data_for_detector-2*.log

Also, s.globalDescriptors().size() becomes zero my simulation. I have put

 
 <remap from="rgbd_image"       to="/rgbd_image/compressed"/>
 apart from setting  subscribe_scan_descriptor=true.

Please note that I am using rtabmap-0.20.7 version at present. I also made the changes that you committed in the above response.

Best,

Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
I will have to make a configuration example to try to reproduce the problem. I'll come back later.
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

matlabbe
Administrator
Hi,

I was able to make cmr_lidarloop working with latest rtabmap version in this post:
 https://github.com/MarvinStuede/cmr_lidarloop/issues/5#issuecomment-991984033

For your specific question on cmr_lidarloop, I think it is better you continue with your post on their github:
https://github.com/MarvinStuede/cmr_lidarloop/issues/4#issuecomment-989714608
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-MAP with only 3D LIDAR and no loop closing

Amber
Hi Matheu,

Thank you for your response. Do you mean that you tried for both the RGBD and the LIDAR data? I am already able to use it for LIDAR only case. Anyways, I'll follow up on the Github issue that I had created.