Pathplanning #399
@ -88,7 +88,15 @@ public class LixfelPathplanner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Vector> planToAnywhere(Vector start, Vector destination) {
|
public List<Vector> planToAnywhere(Vector start, Vector destination) {
|
||||||
return plan(start, destination); //TODO (destination neighbor search)
|
Vector intermediate = walkable.stream().filter(vector -> neighbouring(vector, destination)).findAny().orElse(null);
|
||||||
|
|
||||||
|
if(intermediate == null)
|
||||||
|
return Collections.emptyList();
|
||||||
|
|
||||||
|
List<Vector> plan = plan(start, intermediate);
|
||||||
|
plan.add(destination);
|
||||||
|
|
||||||
|
return plan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Vector> plan(Vector start, Vector destination) {
|
public List<Vector> plan(Vector start, Vector destination) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren