MalcolmMielle / Auto-Complete-Graph

A method to integrate an emergency map into a robot map, so that the robot can plan its way toward places it has not yet explored.
https://malcolmmielle.wordpress.com/2017/08/07/using-emergency-maps-to-help-robots-save-you-in-emergencies/
GNU General Public License v3.0
49 stars 25 forks source link
emergency graph prior-map rescue robot robot-map robotics ros slam

Auto Complete Graph (ACG)

Using emergency maps to help robots save you in emergencies

Description

The goal of this program is described in this blog post and can be summarized by this sentence:

a method to integrate an emergency map into a robot map, so that the robot can plan its way toward places it has not yet explored.

Result example

Paper

The auto-complete graph uses a circular strategy to integrate an emergency map and a robot build map in a global representation. The robot build a map of the environment using NDT mapping, and in parallel do localization in the emergency map using Monte-Carlo Localization. Corners are extracted in both the robot map and the emergency map. Using the information from the localization, a graph-SLAM is created where observation of the emergency map corner are determined using the localization covariance and the position of the emergency map's corners compared to the position of corners detected in the robot map. The graph is further constrained by having emergency map walls able to stretch or shrink but being hard to rotate. This is done because emergency maps have usually local scaling problems but do have correct topology. The paper for the method has been published through MDPI.

@article{Mielle_2019,
 title={The Auto-Complete Graph: Merging and Mutual Correction of Sensor and Prior Maps for SLAM},
 volume={8},
 ISSN={2218-6581},
 url={http://dx.doi.org/10.3390/robotics8020040},
 DOI={10.3390/robotics8020040},
 number={2},
 journal={Robotics},
 publisher={MDPI AG},
 author={Mielle, Malcolm and Magnusson, Martin and Lilienthal, Achim J.},
 year={2019},
 month={May},
 pages={40}
}

A first version of the auto complete graph method is presented in this article on arxiv and was publish in SSRR2017 where it got the best student paper award. This version integrates the emergency map in the robot map using a specific graph matching strategy.

To run the code

Two launch file are used to run the code: one for the mapping and localization, and another for the graph-SLAM optimization.

Mapping and localization parameters

ACG parameters

Run the code example

Run both launch files hannover.launch and acg.launch.

In case the prior map of the mapping system doesn't update according to the updates of the ACG, you have to remap the topic acg_maps of hannover.launch and of acg.launch so that they have the same namespace. They need to communicate for the prior map update of the ACG to be linked to the prior map of the mapping.

  • In Rviz, one can give an approximation of the position_in_robot_frame of the prior compared to robot map using the Publish point button. Only two links are needed to initialize. First click on corner in the emergency map and then in the equivalent corner in the robot map.

Dependencies

ROS

Topics

The results of the ACG can be fetched on the topic /auto_complete_graph_rviz_small_optimi/acg_maps. The message format is as follow:

Header header #standard header information

ndt_map/NDTVectorMapMsg ndt_maps #All robot submap and associated translations
grid_map_msgs/GridMap prior #Prior map as a gridMap with resolution 0.1 and frame "/world"

Each ndt map is centered where the corresponding robot pose node is situated. The robot pose node can be found be adding all transformations.

Another topic where one can find the results is /auto_complete_graph_rviz_small_optimi/acg_maps_om. The message format is as follow:

Header header #standard header information

grid_map_msgs/GridMap[] ndt_maps_om #All robot submap as grid maps. The layer is name 'ndt'
geometry_msgs/Pose[] robot_poses #transformation between the previous submap and the next.
grid_map_msgs/GridMap prior #Prior map as a gridMap with resolution 0.1 and origin frame "/world"

Each ndt map is centered where the corresponding robot pose node is situated.

The results can be visualized using the [auto-complete-graph visualization]() package.

Details about the method

Corner matching using MCL

The MCL poses can be considered as "where the robot thinks he is in the emergency map when considering the laser scanner input". Hence, here is the strategy used to find association between the emergency map and the robot map:

  • Every MCL pose is associated with an equivalent robot map pose and a submap.
  • For every corner in the submap, its coordinate are changed to assume it is seen from the MCL position instead of the robot map pose, i.e. we translate the submap from the robot map pose to the MCL pose.
  • We score the likeliness that a corner correspond to a emergency map corner by using the MCL covariance:
    • We calculate the mahalanobis distance using the MCL covariance: (pose_prior - pose_landmark).dot( mcl_cov_inverse * (pose_prior - pose_landmark));
    • We then calculate the probability of the corners being the same: prob = exp(mahalanobis distance) This probability will be only slightly superior to zero if the corner pose "fit in the covariance". Hence we only need to look for a score slightly superior to zero to get a matching ; we use 5%.
  • If the corner match we create an observation from the robot pose to emergency map corner. This observation's covariance is the equivalent MCL pose covariance.