copy
Create copy of planner object
Description
Examples
Create an occupancy map from an example map and set the map resolution as 10 cells/meter.
map = load("exampleMaps.mat").simpleMap;
map = occupancyMap(map,10);Create a state space and update the state space bounds to be the same as the map limits.
ss = stateSpaceSE2; ss.StateBounds = [map.XWorldLimits; map.YWorldLimits; [-pi pi]];
Create a state validator with stateSpaceSE2 using the map and set the validation distance.
sv = validatorOccupancyMap(ss,Map=map); sv.ValidationDistance = 0.01;
Create a plannerRRT object.
planner = plannerRRT(ss,sv)
planner =
plannerRRT with properties:
StateSpace: [1×1 stateSpaceSE2]
StateValidator: [1×1 validatorOccupancyMap]
StateSampler: [1×1 stateSamplerUniform]
MaxNumTreeNodes: 10000
MaxIterations: 10000
MaxConnectionDistance: 0.1000
GoalReachedFcn: @nav.algs.checkIfGoalIsReached
GoalBias: 0.0500
Create a copy of the plannerRRT object.
plannerNew = copy(planner)
plannerNew =
plannerRRT with properties:
StateSpace: [1×1 stateSpaceSE2]
StateValidator: [1×1 validatorOccupancyMap]
StateSampler: [1×1 stateSamplerUniform]
MaxNumTreeNodes: 10000
MaxIterations: 10000
MaxConnectionDistance: 0.1000
GoalReachedFcn: @nav.algs.checkIfGoalIsReached
GoalBias: 0.0500
Input Arguments
Path planner, specified as a plannerRRT
object or a plannerRRTStar
object.
Output Arguments
Path planner, returned as a plannerRRT
object or a plannerRRTStar
object.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2018b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)