copy
Description
creates a deep copy of the plannerCopy
= copy(planner
)trajectoryOptimalFrenet
object with the same
properties.
Examples
Create Copy of trajectoryOptimalFrenet Object
Create a binaryOccupancyMap
with an obstacle grid map.
grid = zeros(50,100); grid(24:26,48:53) = 1; map = binaryOccupancyMap(grid);
Create a state validator. Assign the map and the state bounds to the state validator.
validator = validatorOccupancyMap; validator.Map = map; validator.StateSpace.StateBounds(1:2,:) = [map.XWorldLimits; map.YWorldLimits];
Create a reference path for the planner.
refPath = [0,25;100,25];
Create a trajectoryOptimalFrenet
object.
planner = trajectoryOptimalFrenet(refPath,validator)
planner = trajectoryOptimalFrenet with properties: Weights: [1x1 struct] FeasibilityParameters: [1x1 struct] TimeResolution: 0.1000 NumSegments: 1 DeviationOffset: 0 CostFunction: @trajectoryOptimalFrenet.nullCost TrajectoryList: [1x1 struct] TerminalStates: [1x1 struct] Waypoints: [2x2 double]
Create a copy of trajectoryOptimalFrenet
object.
plannerNew = copy(planner)
plannerNew = trajectoryOptimalFrenet with properties: Weights: [1x1 struct] FeasibilityParameters: [1x1 struct] TimeResolution: 0.1000 NumSegments: 1 DeviationOffset: 0 CostFunction: @trajectoryOptimalFrenet.nullCost TrajectoryList: [1x1 struct] TerminalStates: [1x1 struct] Waypoints: [2x2 double]
Input Arguments
planner
— Trajectory optimal Frenet object
trajectoryOptimalFrenet
object
Trajectory optimal Frenet object, specified as a trajectoryOptimalFrenet
object.
Output Arguments
plannerCopy
— Copy of trajectory optimal Frenet object
trajectoryOptimalFrenet
object
Copy of trajectory optimal Frenet object, returned as a trajectoryOptimalFrenet
object with the same properties.
Version History
Introduced in R2020b
See Also
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)