Main Content

deleteLoopClosure

Delete loop closure between 2-D lidar scans

Since R2022b

Description

example

deleteLoopClousure(scanMapObj,fromScanID,toScanID) deletes the existing loop closure connection between the scans with scan IDs specified by fromScanID and toScanID from the lidarscanmap object scanMapObj.

Examples

collapse all

Load a MAT file containing a map of a warehouse into the workspace.

data = load("wareHouse.mat");
scanMapObj = data.wareHouseMap;

Display the list of loop closure connections in the lidarscanmap object scanMapObj. Also, display the number of loop closures.

scanMapObj.LoopClosureIDs
ans=13×2 table
    FromScanID    ToScanID
    __________    ________

         4           59   
         4           60   
         4           61   
         4           62   
         4           63   
         4           64   
         4           65   
        11           66   
        11           67   
        11           68   
        11           69   
        11           70   
        11           71   

disp(scanMapObj.NumLoopClosures)
    13

Delete the loop closure connection between scans 4 and 59 by using the deleteLoopClosure function. Then check the number of loop closures in scanMapObj object.

deleteLoopClosure(scanMapObj,4,59);
disp(scanMapObj.NumLoopClosures)
    12

Input Arguments

collapse all

2-D lidar scan map, specified as a lidarscanmap object.

Scan ID of the scan at the beginning of the loop closure, specified as a positive integer or vector. To delete multiple loop closure connections in the map, you must specify the value as a vector.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Scan ID of the scan at the end of the loop closure, specified as a positive integer or vector. To delete multiple loop closure connections in the map, you must specify the value as a vector.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Version History

Introduced in R2022b