View full-text article in PMC Sensors (Basel). 2021 Jun 8;21(12):3955. doi: 10.3390/s21123955 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 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/). PMC Copyright notice Algorithm 1: Loop closure algorithm. Input: Tm,Pm from the sliding window Output: TICP 1: if (Tm,Pm).isKeyframe() then 2: if DT≠ϕ or DP≠ϕ then 3: Tm′← KDtree.RadiusSearch(Tm,DT,r); 4: M← registerPointCloud(DT,DP); 5: if Tm′≠0 then 6: TICP← ComputeICP(Pm,M,Tm); 7: end if 8: end if 9: Tm′←0 10: DT=DT∪Tm 11: DP=DP∪Pm 12:end if