function
Planning.DubinsPolynomial.segmentStartPose
Nominal pose at the start of a Dubins segment
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 | turnRadius | Real | | |
| input | pathType | Planning.Dubins.PathType | | |
| input | normalizedSegmentLength | Real | [3] | |
| input | segmentIndex | Integer | (min=1, max=3) | |
| output | pose | Planning.Dubins.Pose | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function segmentStartPose "Nominal pose at the start of a Dubins segment"
input Real startPosition[2];
input Real startHeading;
input Real turnRadius;
input Planning.Dubins.PathType pathType;
input Real normalizedSegmentLength[3];
input Integer segmentIndex(min=1, max=3);
output Planning.Dubins.Pose pose;
protected
Planning.Dubins.Pose nextPose;
algorithm
pose.position := startPosition;
pose.heading := startHeading;
for precedingSegment in 1:segmentIndex - 1 loop
nextPose := Planning.Dubins.advance(
pose.position,
pose.heading,
Planning.Dubins.segmentType(pathType, precedingSegment),
normalizedSegmentLength[precedingSegment],
turnRadius);
pose := nextPose;
end for;
end segmentStartPose;