Fix propagation of a finished route
This commit is contained in:
parent
74b86dbc59
commit
8947998e0c
@ -240,7 +240,7 @@ public class Obstacles(public val obstacles: List<Obstacle>) {
|
|||||||
var paths = tangentsToFirstObstacle.map { TangentPath(listOf(it)) }
|
var paths = tangentsToFirstObstacle.map { TangentPath(listOf(it)) }
|
||||||
|
|
||||||
while (!paths.all { it.isFinished }) {
|
while (!paths.all { it.isFinished }) {
|
||||||
paths = paths.flatMap { it.nextSteps() }
|
paths = paths.flatMap { if(it.isFinished) listOf(it) else it.nextSteps() }
|
||||||
}
|
}
|
||||||
return paths.map {
|
return paths.map {
|
||||||
CompositeTrajectory2D(
|
CompositeTrajectory2D(
|
||||||
|
Loading…
Reference in New Issue
Block a user