Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Empty && Clearing Obstacles #1236

Open
anath93 opened this issue Nov 14, 2024 · 8 comments
Open

Map Empty && Clearing Obstacles #1236

anath93 opened this issue Nov 14, 2024 · 8 comments

Comments

@anath93
Copy link

anath93 commented Nov 14, 2024

Hello,

I am seeing two issues here, once the subscribe stereo is set to True, the grid map is never published. Using rgb-d sync only it works, checked rqt where the option was true but and camera nodes were subscribed but no map is generated.

Second, I did review your forum page about clearing obstacles. I did open databaseviewer --> export optimized map --> open in gimp --> cleared obstacles --> closed gimp and databaseview by saving --> reload rtabmap in localization mode
image

Finally looks like I found the issue, it happens when I see the tag and map gets optimized bringing back cleared obstacles. If I do not see tags, it works fine.

image

@matlabbe
Copy link
Member

once the subscribe stereo is set to True, the grid map is never published.

Are there warnings every 5 sec telling that stereo topics have not been received? When setting subscribe_stereo to true, by default we switch approx_sync to false assuming that all stereo topics can be exactly synchronized. If it is not the case, approx_sync can be set explicitly to true, but I don't recommend this with stereo data.

For the map re-assembled issue, which version of rtabmap are you using? I could not reproduce it here:
Peek 2024-11-16 15-51

@anath93
Copy link
Author

anath93 commented Nov 17, 2024

Good Afternoon Mathieu,

  1. For the stereo usage internal to rtabmap instead of using sync nodelet I get this warning constantly and map never gets published.

image

  1. I am using 0.21.8 version. So this is how the issue comes. When we map dynamic area which I need to clear the obstacles from using GIMP and add obstacle as needed --> importing the map in databaseview and selection NO to the cropped laser scan and then save and exit.
    If I start rtabmap in localization mode without seeing the tag (RGBD/MarkerDetection), the edited map stays for N number of restarts but as soon as we turn on the tag detection and see it second time, the origional map comes back on with all the obstacles which were erased and I do not understand why. Below is my database, rtabmap and nav2 launch files. Can you please give me your opinion as I am not able to see why this would happen apart from looking into logic of Optimizer/PriorsIgnored as I did isolate Nav2 making sure there is no other node trying to publish map at the same time.
    (I will record my desktop to show this issue tomorrow for sure as I keep editing the map but the origional map keeps coming back)
    https://easyupload.io/m/rnl9ux

  2. As I am using Superpoint approach for feature detection + default knn for loop closure, is it not possible to use Kp/ and Vis/ roi ratio to eliminate bottom of the image as I keep getting error and they are reset to 0.0 0.0 0.0 0.0

@matlabbe
Copy link
Member

  1. I cannot see the full debug log, but are the local occupancy grids created inside Memory::createSignature()?

  2. I tested on latest version from source, which is 0.21.8. "but as soon as we turn on the tag detection and see it second time": Do you mean just changing RGBD/MarkerDetection in the launch file and restarting the launch? I'll check later this week how I can reproduce your issue, it seems related to reloading the map multiple times and changing the parameter.

  3. The ROI seems not supported for superpoint:
    https://github.com/introlab/rtabmap/blob/b2e26e81c14bd7a1394da10998d0264968089cbe/corelib/src/Features2d.cpp#L2571-L2582
    That feature would need to be implemented. I think that could be done here when using the mask to ignore keypoints. The keypoint's position would need to be offset by roi.x and roi.y to be compatible with that code (or move that offset inside the keypoint detection implementation so that we don't need to offset two times with superpoint). I create a feature request for that: Add ROI ratios support for superpoint feature detector rtabmap#1384

@anath93
Copy link
Author

anath93 commented Nov 18, 2024

  1. I just created this log file for your review.
    https://file.io/2pwrVQJLPGwZ

  2. I will make the video as well tomorrow about this weird behavior because I remember telling you this on your forum page but now is time for me to go in production and this behavior is back. Honestly even just by leaving by RGBD/MarkerDetection to always on and trying the tags second time the prior gets loaded with all the obstacles.
    http://official-rtab-map-forum.206.s1.nabble.com/Hesai-QT128-with-Zed2i-and-external-fused-Odometry-td9512i80.html

  3. Yes that is fair. I will add that. Thank you for pointing that in code.

@anath93
Copy link
Author

anath93 commented Nov 18, 2024

@matlabbe Good Morning,

Just wanted to give you quick update, editing my response. The behavior is still same, map shows the obstacle somehow again. I thought is was Rtabmap/StartNewMapOnLoopClosure but does not look like.

@anath93
Copy link
Author

anath93 commented Nov 18, 2024

https://easyupload.io/m/lamu3q

This link has 2 videos which I recorded, with launch files. I assume as parameters which would enable to update map in localization are false. Please advise as I am not able to figure this out. Also there are 2 databases which are same but one of them should have cleared optimized map.

@anath93
Copy link
Author

anath93 commented Nov 19, 2024

@matlabbe I have been running for a day now, I can confirm this issue is during optimizing of graph and triggering of Memory parameters with tags.
Setting Rtabmap/TimeThr to 0 (disable) does not gives this issue of weird graph optimization during global loop closure which is landmark tags here. Can you please shed light on this issue on how memory management can be handled here as I do not want to exceed time of computation over the running days and affect Nav2 finally. What would you recommend ?

introlab/rtabmap#1338 (is this the same issue )

@matlabbe
Copy link
Member

For Nov 17 msg, the log is during mapping ("rtabmap: Deleted database "/home/amr/.ros/rtabmap.db" (--delete_db_on_start or -d are set)."), so I cannot see why it would re-optimize in localization mode.

If you use Rtabmap/TimeThr or Rtabmap/MemoryThr, it means the memory management of RTAB-Map is enabled. When it is enabled, the map can be re-optimized anytime when a node is transferred from/to working memory. That would explain why the map is re-optimized.

I'll suggest to set 'Rtabmap/TimeThr':'0' in localization mode with 'Mem/IncrementalMemory':'false' and 'Mem/InitWMWithAllNodes':'true'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants