function
Planning.Dubins.planType
Construct a path for a requested Dubins family
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | startPosition | Real | [2] | |
| input | startHeading | Real | | |
| input | goalPosition | Real | [2] | |
| input | goalHeading | Real | | |
| input | turnRadius | Real | | |
| input | pathType | Planning.Dubins.PathType | | |
| output | path | Planning.Dubins.Path | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function planType "Construct a path for a requested Dubins family"
input Real startPosition[2];
input Real startHeading;
input Real goalPosition[2];
input Real goalHeading;
input Real turnRadius;
input Planning.Dubins.PathType pathType;
output Planning.Dubins.Path path;
protected
Planning.Dubins.Candidate selected;
algorithm
selected := Planning.Dubins.candidate(
startPosition, startHeading, goalPosition, goalHeading,
turnRadius, pathType);
path.startPosition := startPosition;
path.startHeading := startHeading;
path.goalPosition := goalPosition;
path.goalHeading := goalHeading;
path.turnRadius := turnRadius;
path.pathType := selected.pathType;
path.normalizedSegmentLength := selected.normalizedSegmentLength;
path.length := selected.length;
path.feasible := selected.feasible;
end planType;