feat: Add magnet direction support to GetNextNodeByDirection function

- Added MagnetDirection parameter to GetNextNodeByDirection() function in DirectionalHelper
- Implemented ApplyMagnetDirectionBonus() helper method using vector cross product for turn direction detection
- Straight magnet direction: +0.3f bonus for consistent forward direction
- Left/Right magnet direction: +0.25f bonus for correct turn, -0.2f penalty for wrong turn direction
- Updated DockingValidator to pass actual magnet direction from DetailedPath
- Updated AGVPathfinder calls to use MagnetDirection.Straight as default during path planning phase
- Includes debug output for scoring decisions with magnet direction analysis

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
backuppc
2025-10-27 16:55:13 +09:00
parent 735b7dccec
commit f4ec63330a
3 changed files with 105 additions and 9 deletions

View File

@@ -126,8 +126,9 @@ namespace AGVNavigationCore.PathFinding.Planning
return AGVPathResult.CreateFailure("각 노드간 최단 경로 계산이 실패되었습니다", 0, 0);
//정방향/역방향 이동 시 다음 노드 확인
var nextNodeForward = DirectionalHelper.GetNextNodeByDirection(startNode, prevNode, prevDirection, currentDirection, _mapNodes);
var nextNodeBackward = DirectionalHelper.GetNextNodeByDirection(startNode, prevNode, prevDirection, ReverseDirection, _mapNodes);
// 경로 계획 단계에서는 마그넷 방향이 미리 알려지지 않으므로 Straight로 기본값 사용
var nextNodeForward = DirectionalHelper.GetNextNodeByDirection(startNode, prevNode, prevDirection, currentDirection, MagnetDirection.Straight, _mapNodes);
var nextNodeBackward = DirectionalHelper.GetNextNodeByDirection(startNode, prevNode, prevDirection, ReverseDirection, MagnetDirection.Straight, _mapNodes);
//2.AGV방향과 목적지에 설정된 방향이 일치하면 그대로 진행하면된다.(목적지에 방향이 없는 경우에도 그대로 진행)