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 misalignment in rtabmap during database loading #1195

Open
brayanpa opened this issue Aug 12, 2024 · 1 comment
Open

Map misalignment in rtabmap during database loading #1195

brayanpa opened this issue Aug 12, 2024 · 1 comment

Comments

@brayanpa
Copy link

Hello,

I'm currently using rtabmap in combination with nav2, and I'm encountering an issue where rtabmap modifies the map during the loading of the database in localization mode. Specifically, I'm using the map.pgm file generated by the map_server for nav2. Initially, the map loaded from the image and the map published by rtabmap align perfectly, allowing for consistent navigation and localization.

However, after loading, the map published by rtabmap changes and no longer aligns with the map saved as an image. Once this happens, the maps never coincide again. This issue does not occur with all maps, only with some of them.

Do you have any idea what might be causing this deviation? If there's any additional information I can provide to help resolve this issue, please let me know. Thank you for your assistance!

I've also attached some images illustrating the misalignment between the maps. This not happened in all the maps just in some of them.

image
image
image

@brayanpa brayanpa changed the title Map changing in map topic Map misalignment in rtabmap during database loading Aug 12, 2024
@matlabbe
Copy link
Member

matlabbe commented Aug 15, 2024

If the database doesn't have an optimized map saved, it will re-optimize and re-assemble on runtime, which may create some variations. You can make sure an optimized map is saved by opening the database in rtabmap-databaseViewer, and check in File menu if you can visualize an optimized map (if not, you can generate with corresponding menu option). Also when was the map exported to PGM? if it was during mapping, if rtabmap continues mapping afterwards it may extend the map so that the origin doesn't match with the one previously saved.

Ideally after mapping with rtabmap, make sure in rtabmap-databaseViewer there is an optimized map, then re-launch in localization mode and save the map as PGM/metadata. If the database is always opened in localization mode, it should not change over time (otherwise it is a bug).

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