|
Algorithm 2 ComputeReferenceHorizon: Nominal or Re-Entry (arc-length resampling) |
|
Require: State , nominal path , horizon , band , look-ahead
|
| 1: |
Find closest point to ; compute
|
|
| 2: |
if then
|
▹ Inside band |
| 3: |
|
|
| 4: |
if then
|
|
| 5: |
Pad with until
|
|
| 6: |
return
|
▹ Outside band: re-entry |
| 7: |
Select smoothing point such that
|
| 8: |
Define first point (robot): with
|
|
| 9: |
Build seed
|
|
| 10: |
Compute cumulative arc-length ,
|
|
| 11: |
Fit interpolants (cubic if , else linear) |
|
| 12: |
Resample at uniform arc steps:
|
|
| 13: |
Define
|
|
| 14: |
if
then
|
|
| 15: |
Pad with until
|
|
| 16: |
return
|
|