Main Content

copy

Copy lidar SLAM object

Description

example

newSlamObj = copy(slamObj) creates a deep copy of slamObj with the same properties. Any changes made to newSlamObj are not reflected in slamObj.

Examples

collapse all

Create a lidarSLAM object.

slamObj = lidarSLAM
slamObj = 
  lidarSLAM with properties:

                  PoseGraph: [1x1 poseGraph]
              MapResolution: 20
              MaxLidarRange: 8
            OptimizationFcn: @optimizePoseGraph
       LoopClosureThreshold: 100
    LoopClosureSearchRadius: 8
     LoopClosureMaxAttempts: 1
    LoopClosureAutoRollback: 1
       OptimizationInterval: 1
          MovementThreshold: [0 0]
     ScanRegistrationMethod: 'BranchAndBound'
     TranslationSearchRange: [4 4]
        RotationSearchRange: 1.5708

Create a copy of the lidar SLAM object.

slamObjNew = copy(slamObj)
slamObjNew = 
  lidarSLAM with properties:

                  PoseGraph: [1x1 poseGraph]
              MapResolution: 20
              MaxLidarRange: 8
            OptimizationFcn: @optimizePoseGraph
       LoopClosureThreshold: 100
    LoopClosureSearchRadius: 8
     LoopClosureMaxAttempts: 1
    LoopClosureAutoRollback: 1
       OptimizationInterval: 1
          MovementThreshold: [0 0]
     ScanRegistrationMethod: 'BranchAndBound'
     TranslationSearchRange: [4 4]
        RotationSearchRange: 1.5708

Input Arguments

collapse all

Lidar SLAM object, specified as a lidarSLAM object. The object contains the SLAM algorithm parameters, sensor data, and underlying pose graph used to build the map.

Output Arguments

collapse all

Lidar SLAM object, returned as a lidarSLAM object.

Extended Capabilities

Version History

Introduced in R2019b