copilot file backup

This commit is contained in:
ChiKyun Kim
2025-09-18 17:25:14 +09:00
parent c5f2dbc477
commit 9a9ca4cf32
29 changed files with 7513 additions and 109 deletions

View File

@@ -32,7 +32,8 @@ namespace AGVNavigationCore.PathFinding.Planning
/// <summary>
/// AGV 경로 계산
/// </summary>
public AGVPathResult FindPath(MapNode startNode, MapNode targetNode, AgvDirection currentDirection = AgvDirection.Forward)
public AGVPathResult FindPath(MapNode startNode, MapNode targetNode,
MapNode prevNode)
{
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
@@ -43,12 +44,15 @@ namespace AGVNavigationCore.PathFinding.Planning
return AGVPathResult.CreateFailure("시작 노드가 null입니다.", 0, 0);
if (targetNode == null)
return AGVPathResult.CreateFailure("목적지 노드가 null입니다.", 0, 0);
if (prevNode == null)
return AGVPathResult.CreateFailure("이전위치 노드가 null입니다.", 0, 0);
// 1. 목적지 도킹 방향 요구사항 확인 (노드의 도킹방향 속성에서 확인)
var requiredDirection = GetRequiredDockingDirection(targetNode.DockDirection);
// 통합된 경로 계획 함수 사용
AGVPathResult result = PlanPath(startNode, targetNode, currentDirection, requiredDirection);
AGVPathResult result = PlanPath(startNode, targetNode, prevNode, requiredDirection);
result.CalculationTimeMs = stopwatch.ElapsedMilliseconds;
@@ -86,9 +90,24 @@ namespace AGVNavigationCore.PathFinding.Planning
/// <summary>
/// 통합 경로 계획 (직접 경로 또는 방향 전환 경로)
/// </summary>
private AGVPathResult PlanPath(MapNode startNode, MapNode targetNode, AgvDirection currentDirection, AgvDirection? requiredDirection = null)
private AGVPathResult PlanPath(MapNode startNode, MapNode targetNode, MapNode prevNode, AgvDirection? requiredDirection = null)
{
bool needDirectionChange = requiredDirection.HasValue && (currentDirection != requiredDirection.Value);
bool needDirectionChange = false;// requiredDirection.HasValue && (currentDirection != requiredDirection.Value);
//현재 위치에서 목적지까지의 최단 거리 모록을 찾는다.
var DirectPathResult = _basicPathfinder.FindPath(startNode.NodeId, targetNode.NodeId);
//이전 위치에서 목적지까지의 최단 거리를 모록을 찾는다.
var DirectPathResultP = _basicPathfinder.FindPath(prevNode.NodeId, targetNode.NodeId);
//
if (DirectPathResultP.Path.Contains(startNode.NodeId))
{
}
if (needDirectionChange)
{