refactor: PathFinding 폴더 구조 개선 및 도킹 에러 기능 추가
- PathFinding 폴더를 Core, Validation, Planning, Analysis로 세분화 - 네임스페이스 정리 및 using 문 업데이트 - UnifiedAGVCanvas에 SetDockingError 메서드 추가 - 도킹 검증 시스템 인프라 구축 - DockingValidator 유틸리티 클래스 추가 - 빌드 오류 수정 및 안정성 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using AGVMapEditor.Models;
|
||||
using AGVNavigationCore.Models;
|
||||
using AGVNavigationCore.PathFinding;
|
||||
using AGVNavigationCore.PathFinding.Core;
|
||||
using AGVNavigationCore.Controls;
|
||||
|
||||
namespace AGVSimulator.Models
|
||||
@@ -36,7 +37,7 @@ namespace AGVSimulator.Models
|
||||
/// <summary>
|
||||
/// 경로 완료 이벤트
|
||||
/// </summary>
|
||||
public event EventHandler<PathResult> PathCompleted;
|
||||
public event EventHandler<AGVPathResult> PathCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// 오류 발생 이벤트
|
||||
@@ -55,7 +56,7 @@ namespace AGVSimulator.Models
|
||||
private float _currentSpeed;
|
||||
|
||||
// 경로 관련
|
||||
private PathResult _currentPath;
|
||||
private AGVPathResult _currentPath;
|
||||
private List<string> _remainingNodes;
|
||||
private int _currentNodeIndex;
|
||||
private string _currentNodeId;
|
||||
@@ -108,7 +109,7 @@ namespace AGVSimulator.Models
|
||||
/// <summary>
|
||||
/// 현재 경로
|
||||
/// </summary>
|
||||
public PathResult CurrentPath => _currentPath;
|
||||
public AGVPathResult CurrentPath => _currentPath;
|
||||
|
||||
/// <summary>
|
||||
/// 현재 노드 ID
|
||||
@@ -180,7 +181,7 @@ namespace AGVSimulator.Models
|
||||
/// </summary>
|
||||
/// <param name="path">실행할 경로</param>
|
||||
/// <param name="mapNodes">맵 노드 목록</param>
|
||||
public void StartPath(PathResult path, List<MapNode> mapNodes)
|
||||
public void StartPath(AGVPathResult path, List<MapNode> mapNodes)
|
||||
{
|
||||
if (path == null || !path.Success)
|
||||
{
|
||||
@@ -287,7 +288,7 @@ namespace AGVSimulator.Models
|
||||
|
||||
/// <summary>
|
||||
/// AGV 위치 직접 설정 (시뮬레이터용)
|
||||
/// 이전 위치를 TargetPosition으로 저장하여 리프트 방향 계산이 가능하도록 함
|
||||
/// TargetPosition을 이전 위치로 저장하여 리프트 방향 계산이 가능하도록 함
|
||||
/// </summary>
|
||||
/// <param name="newPosition">새로운 위치</param>
|
||||
public void SetPosition(Point newPosition)
|
||||
@@ -295,12 +296,12 @@ namespace AGVSimulator.Models
|
||||
// 현재 위치를 이전 위치로 저장 (리프트 방향 계산용)
|
||||
if (_currentPosition != Point.Empty)
|
||||
{
|
||||
_targetPosition = _currentPosition;
|
||||
_targetPosition = _currentPosition; // 이전 위치 (previousPos 역할)
|
||||
}
|
||||
|
||||
|
||||
// 새로운 위치 설정
|
||||
_currentPosition = newPosition;
|
||||
|
||||
|
||||
// 위치 변경 이벤트 발생
|
||||
PositionChanged?.Invoke(this, _currentPosition);
|
||||
}
|
||||
@@ -341,16 +342,15 @@ namespace AGVSimulator.Models
|
||||
/// <summary>
|
||||
/// 현재 RFID 시뮬레이션 (현재 위치 기준)
|
||||
/// </summary>
|
||||
public string SimulateRfidReading(List<MapNode> mapNodes, List<RfidMapping> rfidMappings)
|
||||
public string SimulateRfidReading(List<MapNode> mapNodes)
|
||||
{
|
||||
// 현재 위치에서 가장 가까운 노드 찾기
|
||||
var closestNode = FindClosestNode(_currentPosition, mapNodes);
|
||||
if (closestNode == null)
|
||||
return null;
|
||||
|
||||
// 해당 노드의 RFID 매핑 찾기
|
||||
var mapping = rfidMappings.FirstOrDefault(m => m.LogicalNodeId == closestNode.NodeId);
|
||||
return mapping?.RfidId;
|
||||
// 해당 노드의 RFID 정보 반환 (MapNode에 RFID 정보 포함)
|
||||
return closestNode.HasRfid() ? closestNode.RfidId : null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user