feat: 방향전환 경로 검증 시스템 구현

- PathValidationResult 클래스를 Validation 폴더에 적절히 배치
- BacktrackingPattern 클래스로 A→B→A 패턴 상세 검출
- DirectionChangePlanner에서 되돌아가기 패턴 자동 검증
- CLAUDE.md에 AGVNavigationCore 프로젝트 구조 가이드 추가
- 빌드 시스템 오류 모두 해결

🤖 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 09:24:45 +09:00
parent 8d5ddbe008
commit cacd7fab1b
15 changed files with 789 additions and 237 deletions

View File

@@ -52,7 +52,16 @@ namespace AGVNavigationCore.Models
}
var json = File.ReadAllText(filePath);
var mapData = JsonConvert.DeserializeObject<MapFileData>(json);
// JSON 역직렬화 설정: 누락된 속성 무시, 안전한 처리
var settings = new JsonSerializerSettings
{
MissingMemberHandling = MissingMemberHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Populate
};
var mapData = JsonConvert.DeserializeObject<MapFileData>(json, settings);
if (mapData != null)
{
@@ -63,6 +72,9 @@ namespace AGVNavigationCore.Models
// 기존 Description 데이터를 Name으로 마이그레이션
MigrateDescriptionToName(result.Nodes);
// DockingDirection 마이그레이션 (기존 NodeType 기반으로 설정)
MigrateDockingDirection(result.Nodes);
// 중복된 NodeId 정리
FixDuplicateNodeIds(result.Nodes);
@@ -143,6 +155,36 @@ namespace AGVNavigationCore.Models
// 기존 파일들은 다시 저장될 때 Description 없이 저장됨
}
/// <summary>
/// 기존 맵 파일의 DockingDirection을 NodeType 기반으로 마이그레이션
/// </summary>
/// <param name="mapNodes">맵 노드 목록</param>
private static void MigrateDockingDirection(List<MapNode> mapNodes)
{
if (mapNodes == null || mapNodes.Count == 0) return;
foreach (var node in mapNodes)
{
// 기존 파일에서 DockingDirection이 기본값(DontCare)인 경우에만 마이그레이션
if (node.DockDirection == DockingDirection.DontCare)
{
switch (node.Type)
{
case NodeType.Charging:
node.DockDirection = DockingDirection.Forward;
break;
case NodeType.Docking:
node.DockDirection = DockingDirection.Backward;
break;
default:
// Normal, Rotation, Label, Image는 DontCare 유지
node.DockDirection = DockingDirection.DontCare;
break;
}
}
}
}
/// <summary>
/// 중복된 NodeId를 가진 노드들을 고유한 NodeId로 수정
/// </summary>