## 1 Introduction
Even with this consideration, it can be seen that this is a complex problem in which a different approach to the solution can be chosen. If an algorithm is used to map a dynamic environment that does not consider the occurrence of dynamic objects, it will adversely affect the mapping result. This has resulted in new methods and approaches to addressing SLAM. Detection and tracking of moving objects (DATMO) deals with the detection and tracking of dynamic objects. This issue is relatively old and the author has summarized it in [5], summarizing the current state and possible methods of solution. In [6], the author focused on the creation of a probabilistic technique of data clustering and estimation of the movement of individual clusters. He called this method CRF-Clustering (Conditional Random Fields). In addition, he addressed the issue of overlapping points of dynamic objects in individual consecutive images. He performed the measurements by scanning the environment using a 2D lidar. The problem of creating a map in a dynamic environment is addressed by the author in [7]. In the article, the author designs a new method that inserts a probabilistic technique for identifying false measurements between mapping and localization processes. The aim of his work was to capture dynamic objects, isolate them, and represent them in 3D space using lidar scanning. In this approach, he worked with both 2D and 3D lidar data. In the mentioned sources, the authors mainly focused on the detection of a dynamic object, or its tracking or removal from the map. One of the interesting options for accessing detected dynamic objects can take advantage of the autonomous movement of the robot. If the robot detects the occurrence of a dynamic object in its motion trajectory, it recalculates a new trajectory that would dynamically reflect the object on the map. This mentioned issue was an area of our interest. One of the first steps was to design an algorithm that would allow the detection of dynamic objects. During the designing process, we decided to use a method that is based on the scan matching. Scan matching is the process of obtaining the relative pose between two frames whose visual fields overlap with one another. This method is often used when solving SLAM. A high-precision frame-to-frame scan matching algorithm is critical to improve the autonomous navigation capabilities of robots. Scan matching algorithms can be divided into two categories based on the type of sensor used: laser scan matching algorithms and visual scan matching algorithms. Compared to visual sensors, laser lidar has anti-interferencecapabilities, and its performance is not affected by light. Moreover, the research results of this paper were 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 in [8]. A large number of variants [9] have been proposed based on ICP. Authors in [10] proposed Point-to-Line ICP (PL-ICP), which overcomes the shortcomings of low-resolution lidar data and has quadratic convergence properties, achieving fewer iterations and higher accuracy, and this algorithm performed well in a structured environment. Similar to the PL-ICP, [11] proposed a probabilistic version of the ICP: GICP (Generalized ICP), which uses the Gaussian distribution to model the lidar sensor data and assigns weights according to the normal vector. This algorithm can be considered to be a variant of Point-to-Plane ICP [12]. The authors in [13] introduced a frame-to-frame Scan Matching Algorithm for 2D Lidar Based on Attention. This method took into account only a part of the images in the comparison, which guaranteed less error accumulation and higher accuracy. We were most interested in the SegMatch method described in [14].