fix: AGV 방향 전환 시스템 대폭 개선

- DirectionChangePlanner에 간단한 방향 전환 로직 추가
- 직접 경로에 갈림길이 포함된 경우 해당 갈림길에서 방향 전환
- PathTester 테스트 케이스를 실제 맵 파일 노드 ID와 일치하도록 수정
- 갈림길 정보 분석 기능 추가

테스트 결과:
- 기본 경로: 6/11 → 8/11 통과 (+2)
- 방향 전환: 0/11 → 10/11 통과 (+10)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ChiKyun Kim
2025-09-17 10:49:06 +09:00
parent cacd7fab1b
commit c5f2dbc477
10 changed files with 1134 additions and 1 deletions

View File

@@ -84,7 +84,27 @@ namespace AGVNavigationCore.PathFinding.Planning
}
}
// 방향 전환이 필요한 경우
// 방향 전환이 필요한 경우 - 먼저 간단한 직접 경로 확인
var directPath2 = _pathfinder.FindPath(startNodeId, targetNodeId);
if (directPath2.Success)
{
// 직접 경로에 갈림길이 포함된 경우 그 갈림길에서 방향 전환
foreach (var nodeId in directPath2.Path.Skip(1).Take(directPath2.Path.Count - 2)) // 시작과 끝 제외
{
var junctionInfo = _junctionAnalyzer.GetJunctionInfo(nodeId);
if (junctionInfo != null && junctionInfo.IsJunction)
{
// 간단한 방향 전환: 직접 경로 사용하되 방향 전환 노드 표시
return DirectionChangePlan.CreateSuccess(
directPath2.Path,
nodeId,
$"갈림길 {nodeId}에서 방향 전환: {currentDirection} → {requiredDirection}"
);
}
}
}
// 복잡한 방향 전환이 필요한 경우
return PlanDirectionChangeRoute(startNodeId, targetNodeId, currentDirection, requiredDirection);
}