Citation: Huang, S.; Huang, H.-Z. A
Frame-to-Frame Scan Matching
Algorithm for 2D Lidar Based on
Attention. Appl. Sci. 2022, 12, 4341.
https://doi.org/10.3390/
app12094341
Academic Editors: Yangquan Chen,
Subhas Mukhopadhyay,
Nunzio Cennamo, M. Jamal Deen,
Junseop Lee and Simone Morais
Received: 14 March 2022
Accepted: 21 April 2022
Published: 25 April 2022
Publisher’s Note: MDPI stays neutral
with regard to jurisdictional claims in
published maps and institutional affil-
iations.
Copyright: © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Article
A Frame-to-Frame Scan Matching Algorithm for 2D Lidar Based
on Attention
Shan Huang
1,2
and Hong-Zhong Huang
1,2,
*
1
School of Mechanical and Electrical Engineering, University of Electronic Science and Technology of China,
Chengdu 611731, China; huangshan@std.uestc.edu.cn
2
Center for System Reliability and Safety, University of Electronic Science and Technology of China,
Chengdu 611731, China
* Correspondence: hzhuang@uestc.edu.cn; Tel.: +86-28-6181252
Abstract:
The frame-to-frame scan matching algorithm is the most basic robot localization and
mapping module and has a huge impact on the accuracy of localization and mapping tasks. To
achieve high-precision localization and mapping, we propose a 2D lidar frame-to-frame scanning
matching algorithm based on an attention mechanism called ASM (Attention-based Scan Matching).
Inspired by human navigation, we use a heuristic attention selection mechanism that only considers
the areas covered by the robot’s attention while ignoring other areas when performing frame-to-
frame scan matching tasks to achieve a similar performance as landmark-based localization. The
selected landmark is not switched to another one before it becomes invisible; thus, the ASM cannot
accumulate errors during the life cycle of a landmark, and the errors will only increase when the
landmark switches. Ideally, the errors accumulate every time the robot moves the distance of the lidar
sensing range, so the ASM algorithm can achieve high matching accuracy. On the other hand, the
number of involved data during scan matching applications is small compared to the total number
of data due to the attention mechanism; as a result, the ASM algorithm has high computational
efficiency. In order to prove the effectiveness of the ASM algorithm, we conducted experiments on
four datasets. The experimental results show that compared to current methods, ASM can achieve
higher matching accuracy and speed.
Keywords: 2D lidar; scan matching; attention; robotics
1. Introduction
Frame-to-frame scan matching is the process of obtaining the relative pose between
two frames whose visual fields overlap with one another. Frame-to-frame scan matching is
a basic module for robot localization and mapping and has a great impact on the accuracy of
localization and mapping. High-precision frame-to-frame scan matching can significantly
improve the loop detection accuracy while reducing the computational burden of loop
detection. Therefore, frame-to-frame scan matching plays an important role in robot state
estimation. A high-precision frame-to-frame scan matching algorithm is critical to improve
the autonomous navigation capabilities of robots.
Frame-to-frame matching algorithms can be divided into two categories based on
the type of sensor used: laser frame-to-frame matching algorithms and visual frame-to-
frame matching algorithms. Compared to visual sensors, laser lidar has anti-interference
capabilities, and its performance is not affected by light. Moreover, the research results of
this paper are mainly applied to indoor service robots, so 2D lidar sensors were adopted
for scan matching.
Due to the importance of the frame-to-frame scan matching algorithm, it has attracted
much research attention, and research has resulted in many milestone findings. The
most classic frame-to-frame scan matching algorithm is the Iterative Closest Point (ICP)
algorithm proposed by Besl et al. [
1
]. ICP associated each lidar point in the current frame
Appl. Sci. 2022, 12, 4341. https://doi.org/10.3390/app12094341 https://www.mdpi.com/journal/applsci