cartographer-project / cartographer_ros

Provides ROS integration for Cartographer.
Apache License 2.0
1.64k stars 1.2k forks source link

Wrong closures between submaps from different trajectories #1578

Open mtlazaro opened 3 years ago

mtlazaro commented 3 years ago

Hi,

we are trying to use Cartographer's multi-session feature to incrementally build a large map of the environment from different trajectories.

We have 3 bagfiles corresponding to 3 different sessions (link) The first two sessions explore a similar area and you can see the result here (it is a quite open area, challenging but we consider it as a good result).
image

The problem comes with the third session when Cartographer starts to have a wrong behaviour finding loop closures between submaps that are very far each other. And these constraints deform completely the map.

We have tried different tunings without success. This is the result: image image

We would like to understand if it is a tuning problem or if there is something else happening in the management of different submaps from different trajectories.

I've put in this repo the launch, config files that we are using and we explain in the Readme the steps that we are following.

Hope someone can give us some hint about how to improve this map.

Mayte.

eithwa commented 3 years ago

image I used your data but the same situation did not happen, the result is good, it may be related to computer performance. But it is true that when I use the third piece of data, there is more deviation when the robot rotates. I think the reason comes from odom, so I reduce its weight and get better results.

TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
POSE_GRAPH.optimization_problem.odometry_rotation_weight = 0
POSE_GRAPH.optimization_problem.odometry_translation_weight = 0.5