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

How to overlapping_submaps_trimmer_2d #1816

Closed imstevenpmwyca closed 3 years ago

imstevenpmwyca commented 3 years ago

Hello! I am trying to use the submap trimmer functionality to remap parts of the map. I added to the trajectory_builder.lua the following code as specified here and here #1534

overlapping_submaps_trimmer_2d = { fresh_submaps_count = 2, min_covered_area = 2, min_added_submaps_count = 5, },

However, as soon as I start the cartographer_node I get the following error:

[FATAL] [/cartographer_node] [2021-03-02 16:20:44]: F0302 17:20:44.000000 2345413 lua_parameter_dictionary.cc:410] Check failed: 1 == reference_counts_.count(key) (1 vs. 0) Key 'overlapping_submaps_trimmer_2d' was used the wrong number of times.

And then it dies. Do I need to setup something else first? Thanks for the help!

imstevenpmwyca commented 3 years ago

Solved it, the overlapping submaps trimmer was moved to the PoseGraphOptions #1408. So instead of adding the options in trajectory_builder.lua, they should be added to pose_graph.lua. That means that the suggestion in #1534 is misleading.