Main Content

copy

Create deep copy of plannerBenchmark object

Since R2022a

    Description

    plannerBM2 = copy(plannerBM1) creates a deep copy of the plannerBenchmark object with the same properties.

    example

    Examples

    collapse all

    Create an occupancy map from an example map.

    load("exampleMaps.mat","simpleMap");
    map = occupancyMap(simpleMap);

    Specify the start and goal states.

    start = [5 8 pi/2];
    goal = [7 18 pi/2];

    Create a plannerBenchmark object using the map.

    pbo = plannerBenchmark(map,start,goal)
    pbo = 
      plannerBenchmark with properties:
    
          Environment: [1x1 occupancyMap]
                Start: [5 8 1.5708]
                 Goal: [7 18 1.5708]
        PlannerOutput: [1x1 struct]
    
    

    Create a copy of plannerBenchmark object.

    pboNew = copy(pbo)
    pboNew = 
      plannerBenchmark with properties:
    
          Environment: [1x1 occupancyMap]
                Start: [5 8 1.5708]
                 Goal: [7 18 1.5708]
        PlannerOutput: [1x1 struct]
    
    

    Input Arguments

    collapse all

    Path planner benchmark, specified as a plannerBenchmark object.

    Output Arguments

    collapse all

    Copy of path planner benchmark, returned as a plannerBenchmark object.

    Version History

    Introduced in R2022a

    See Also

    Objects

    Functions