autonohm / ohm_tsd_slam

SLAM approach based on truncated signed distance transform
21 stars 25 forks source link

Grid init in multi-robot SLAM #18

Closed max-kuzmin closed 6 years ago

max-kuzmin commented 6 years ago

https://github.com/autonohm/ohm_tsd_slam/blob/cd63cadf763d5781add00ab4880216098480c764/src/ThreadMapping.cpp#L32-L41

ThreadMapping::_initialized variable sets true after first call of ThreadMapping::initPush. So if there if more than one ThreadLocalize, only one of them can push initial position into grid. It causes error in scans registration from other ThreadLocalize, because of this check https://github.com/autonohm/ohm_tsd_slam/blob/cd63cadf763d5781add00ab4880216098480c764/src/ThreadLocalize.cpp#L418 It only works correctly if all robots start from one place

philko4711 commented 6 years ago

Hi, in order to have two robots doing an initial push, their initial pose must be known. Otherwise you will get huge errors when both robots finally meet. Therefore only one robot is allowed to do the initial push. All other robots need to find their pose in the map first before they are allowed to push.

max-kuzmin commented 6 years ago

Yes, I understand this point. But what if I know their exact relative poses? I can't start their moving from different locations, because of this. But it could be very helpful for example if I run experiment in simulator Gazebo, or if I know precise sizes of building. So there at least should be parameter, that allows to select whether should initial pose be used or it is should be received by scan-matching.

philko4711 commented 6 years ago

The ohm_tsd_slam is the wrong package for this approach. Even if you know exactly the pose difference between the robots (and in real life this is an impossible task) the generated map is never faultless. Small errors will result in a unsolveable problem when the robots meet. Approaches which use one map for each robot and implement a map matching approach could be used but ohm_tsd_slam was never designed for an approach like yours.