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.1k stars 2.25k forks source link

Optional motion-filter for adding odometry data to the pose graph. #1757

Closed MichaelGrupp closed 3 years ago

MichaelGrupp commented 3 years ago

This introduces an option to control the amount of odometry data that enters the pose graph by motion-filtering it. This is very useful to bound memory when standing still for longer periods of time.

If the new option is not configured, all odometry data goes unfiltered into the pose graph as usual.

Signed-off-by: Michael Grupp grupp@magazino.eu

wohe commented 3 years ago

@MichaelGrupp Can you explain a bit about the context when you see large memory consumption from odometry data? Is this for pure localization or SLAM? It would seem that odometry data is very small compared to the other data we keep.

MichaelGrupp commented 3 years ago

The motivation for this was localization. Concrete example: we run a robot with pure localization mode that can be "idle" for some time, e.g. during a charging phase, but we want to keep Cartographer running. In this case, our motion filter is configured to not add new nodes to the pose graph unless we move again, which works fine. But we noticed that we were still accumulating odometry data that has no additional value without movement. Filtering odometry data that is close to zero prevents that and I didn't observe any side effects on the optimization since the values with information (when moving) still enter the pose graph.

bochen87 commented 3 years ago

The motivation for this was localization. Concrete example: we run a robot with pure localization mode that can be "idle" for some time, e.g. during a charging phase, but we want to keep Cartographer running. In this case, our motion filter is configured to not add new nodes to the pose graph unless we move again, which works fine. But we noticed that we were still accumulating odometry data that has no additional value without movement. Filtering odometry data that is close to zero prevents that and I didn't observe any side effects on the optimization since the values with information (when moving) still enter the pose graph.

It makes sense. I think most robots have certain idle time where you would still want to keep localization alive.

MichaelGrupp commented 3 years ago

@wohe can you have a look again if you have time?

MichaelGrupp commented 3 years ago

Done.