This commit is contained in:
xuzhiheng
2025-06-24 09:59:47 +08:00
parent 2be7b938c2
commit 6d96ea6891
5 changed files with 198 additions and 8 deletions

View File

@@ -1052,11 +1052,13 @@ public class DefaultVehicleController
case LENGTH_RESPECTED:
// Free resources allocated for executed commands, but keep as many as needed for the
// vehicle's current length.
long vehicleLeghtRadius = 3700 / 2; //车辆长度半径
BoundingBox boundingBox = commAdapter.getProcessModel().getBoundingBox().withLength(vehicleLeghtRadius); //长度有问题
int freeableResourceSetCount
= ResourceMath.freeableResourceSetCount(
SplitResources.from(allocatedResources, Set.of(currentVehiclePosition))
.getResourcesPassed(),
commAdapter.getProcessModel().getBoundingBox().getLength()
boundingBox.getLength()
);
for (int i = 0; i < freeableResourceSetCount; i++) {
Set<TCSResource<?>> oldResources = allocatedResources.poll();