cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.04k stars 2.24k forks source link

Remapping Exception #1846

Open GrantZheng86 opened 3 years ago

GrantZheng86 commented 3 years ago

When using the "overlapping submap trimmer" config in the lua file, the trimmer will produce a "std::out_of_range" error caused by map::at. It seems that this exception is not contained in a try-catch loop.

This exception does not happen to every remapping session. Sometimes a remapping session can finish without this exception, but I am suspecting this exception will eventually happen if the remapping session is long enough.

Also, this exception will not occur to a remapped pbstream file if only running in localization-only mode (i.e. all the overlapping trimmer parameters are disabled). This made me think that there could be something wrong in the "overlapping_submap_trimmer_2d.cc" file.

In my testing, it seems that the trimmer parameter will affect when the exception will get triggered (I was using a bag file to test the parameters, so the update information should stay constant). To my knowledge, those three trimmer parameters should only affect the condition that submaps get replaced.

Does anyone have any clues about this problem?

Thanks!