- Added detailed debug output to GetNextNodeByDirection() with:
- Initial node information (positions, movement vectors)
- All candidate nodes evaluation with step-by-step scoring
- Score calculations: base score → motor direction → magnet direction
- Final selection with best score
- Added detailed debug output to ValidateDockingDirection() with:
- Path validation stage information
- Expected vs actual next node comparison
- Movement vector analysis for mismatch debugging
- Success/failure status for each path segment
Debug output includes:
- Node IDs, RFIDs, positions, and vectors
- Normalized vectors and dot products
- Score progression through each bonus/penalty application
- Direction consistency analysis
- Final scoring results with selection indicators
This enables detailed tracing of path prediction and validation issues.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
## Summary
- Changed Path property type from List<string> to List<MapNode> for better type safety
- Eliminated O(n) node lookups throughout pathfinding system
- Added DirectionalHelper with motor direction consistency bonus/penalty
- Updated all path processing to work with MapNode objects directly
## Files Modified
- AGVPathResult.cs: Path property and CreateSuccess() method signature
- AStarPathfinder.cs: Path generation and node lookup optimization
- AGVPathfinder.cs: Path processing with MapNode objects
- DirectionChangePlanner.cs: Direction change planning with MapNode paths
- DockingValidator.cs: Docking validation with direct node access
- UnifiedAGVCanvas.Events.cs: Path visualization with MapNode iteration
- UnifiedAGVCanvas.cs: Destination node access
- VirtualAGV.cs: Path conversion to string IDs for storage
- DirectionalHelper.cs: Enhanced with motor direction awareness
- NodeMotorInfo.cs: Updated for new path structure
## Benefits
- Performance: Eliminated O(n) lookup searches
- Type Safety: Compile-time checking for node properties
- Code Quality: Direct property access instead of repeated lookups
- Maintainability: Single source of truth for node data
## Build Status
✅ AGVNavigationCore: Build successful (0 errors, 2 warnings)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Path Direction Detection (AGVPathfinder.cs):
- Added GetNextNodeByDirection() method to determine next node based on Forward/Backward direction
- Implements vector-based angle calculation for intelligent node selection
- Forward: selects node in continuous direction
- Backward: selects node in opposite direction
- Validates if selected direction matches path requirements
Logic additions at line 150-167:
- Detects next node for Forward and Backward directions
- Checks if backward movement aligns with path's next node
- Returns path with appropriate motor direction (ReverseDirection when applicable)
Improved Path Visualization (UnifiedAGVCanvas.Events.cs):
- Refined equilateral triangle arrows (8 pixels, symmetric)
- 50% transparency for purple path lines with 2x thickness
- Bidirectional path detection (darker color for repeated segments)
- Better visual distinction for calculated paths
Technical Details:
- Added System.Drawing using statement for PointF operations
- Added DirectionalPathfinder initialization
- Vector normalization for angle-based decisions
- Dot product calculation for direction similarity scoring
Result: AGV can now intelligently select next node based on current movement direction and validate path feasibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced path drawing with better visibility:
1. Arrow improvements:
- Changed from line-based arrows to filled triangle shapes
- Increased arrow size by 1.5x for better visibility
- Added polygon fill with outline for clearer identification
2. Path line improvements:
- Added 50% transparency to purple path color (Alpha: 128)
- Increased line thickness by 2x (from 4 to 8 pixels)
- Improved visual contrast and clarity
3. Bidirectional path detection:
- Detect routes that traverse the same segment multiple times
- Display bidirectional paths with higher opacity (darker color, Alpha: 200)
- Visual distinction helps identify round-trip routes
Changes in UnifiedAGVCanvas.Events.cs:
- Modified DrawDirectionArrow() to use FillPolygon instead of DrawLine
- Enhanced DrawPath() with transparency, thickness, and bidirectional detection
- Added System.Collections.Generic using statement
Result: Much better visual identification of calculated paths in HMI
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed from AGVPathfinder.cs:
- ConvertToDetailedPath() - unused private method
- CalculatePathDistance() - unused private method
- ValidatePath() - unused public method
- ValidatePhysicalConstraints() - only called by ValidatePath (now removed)
- OptimizePath() - unused public method (TODO placeholder only)
- GetPathSummary() - unused public method (debug helper)
Kept essential methods:
- FindNearestJunction() - used by FindPath_test
- FindNearestJunctionOnPath() - used by FindPath_test
- MakeDetailData() - used by FindPath_test
- MakeMagnetDirection() - used by FindPath_test
Removed from VirtualAGV.cs:
- _targetId field - never used
- _currentId field - never used
- _rotationSpeed field - never used (read-only, no references)
Removed from UnifiedAGVCanvas.cs:
- AGVSelected event - unused
- AGVStateChanged event - unused
Result: Cleaner codebase, reduced technical debt, easier maintenance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed critical issue in ConvertToDetailedPath where motor direction was not passed to GetRequiredMagnetDirection
- Motor direction is essential for backward movement as Left/Right directions must be inverted
- Modified AGVPathfinder.cs line 280 to pass currentDirection parameter
- Ensures backward motor direction properly inverts magnet sensor directions
feat: Add waypoint support to pathfinding system
- Added FindPath overload with params string[] waypointNodeIds in AStarPathfinder
- Supports sequential traversal through multiple intermediate nodes
- Validates waypoints and prevents duplicates in sequence
- Returns combined path result with aggregated metrics
feat: Implement path result merging with DetailedPath preservation
- Added CombineResults method in AStarPathfinder for intelligent path merging
- Automatically deduplicates nodes when last of previous path equals first of current
- Preserves DetailedPath information including motor and magnet directions
- Essential for multi-segment path operations
feat: Integrate magnet direction with motor direction awareness
- Modified JunctionAnalyzer.GetRequiredMagnetDirection to accept AgvDirection parameter
- Inverts Left/Right magnet directions when moving Backward
- Properly handles motor direction context throughout pathfinding
feat: Add automatic start node selection in simulator
- Added SetStartNodeToCombo method to SimulatorForm
- Automatically selects start node combo box when AGV position is set via RFID
- Improves UI usability and workflow efficiency
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix grid line coordinate transformation (world to screen)
- Properly align grid with zoom and pan transformations
- Calculate grid start position at GRID_SIZE multiples
- Draw grid lines across entire visible canvas area
- Ensure grid lines render completely regardless of zoom level
- Grid now displays consistently at all zoom magnifications
Fixes: Grid no longer disappears or renders incompletely when zoomed in
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Support middle mouse button (wheel) for map panning alongside left button
- Middle button drag always enables panning regardless of edit mode
- Change cursor to hand icon during middle button panning for clarity
- Left button panning remains unchanged (mode-dependent behavior preserved)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix ScreenToWorld coordinate transformation bug in wheel event
- Implement proper mouse cursor-centered zoom calculation
- Calculate world coordinates before zoom and maintain them after zoom
- Adjust pan offset to keep mouse cursor pointing at same world position
- Remove matrix-based transformation that was causing coordinate issues
Fixes: Wheel zoom now correctly centers on mouse cursor position and no longer causes erratic panning
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Reorganized AGVMapEditor, AGVNavigationCore, AGVSimulator into AGVLogic folder
- Removed deleted project files from root folder tracking
- Updated CLAUDE.md with AGVLogic-specific development guidelines
- Clean separation of independent project development from main codebase
- Projects now ready for independent development and future integration
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- UnifiedAGVCanvas 마우스 휠 줌 로직 개선
- 마우스 커서 위치를 기준점으로 하는 정확한 줌 구현
- 줌 비율 1.2배 → 1.15배로 조정 (더 부드러운 동작)
- 스크린 좌표와 월드 좌표 변환을 명시적으로 처리
- 마우스 위치가 줌 전후 동일한 월드 좌표를 가리키도록 보장
개선 효과:
✅ 마우스 아래의 콘텐츠가 줌 중심
✅ 더 자연스럽고 예측 가능한 줌 동작
✅ 좌표 계산 로직 명확화
추가:
- PROJECT_SUMMARY.md: 3개 프로젝트 상세 요약
- AGVMapEditor (맵 편집 도구)
- AGVNavigationCore (경로 계산 엔진)
- AGVSimulator (시뮬레이터)
- UnifiedAGVCanvas 기능 설명
- 현재 미완성 부분 정리
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- AGVMapEditor/Models/MapData.cs 제거 (미사용)
- SubProject/AGVControl/Models/MapData.cs 제거 (레거시 코드)
- AGVMapEditor.csproj에서 MapData.cs 항목 제거
- AGVMapEditor/Forms/MainForm.cs에서 불필요한 using 제거
모든 맵 데이터 관리는 AGVNavigationCore.Models.MapLoader를 사용
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- 불필요한 AGVPathTester 프로젝트 제거
- 불필요한 PathLogic 프로젝트 제거
- AGVCSharp.sln에서 두 프로젝트 참조 제거
- 핵심 개발은 AGVNavigationCore에 집중
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- agv_path_planner.py: JSON 형식 맵 파일 지원 추가
* parse_map_json() 함수로 MapData.json/NewMap.agvmap 파싱
* RFID 정규화 및 별칭 지원 (007/7 등)
* TP(터닝포인트) 기반 방향전환 알고리즘 검증 완료
- universal_pathfinder.py: 범용 패턴 기반 경로 탐색
* Q1-1, Q1-2, Q2-1, Q2-2 모든 시나리오 패턴 구현
* UniversalPathFormatter 방향전환 표기 수정
* 28개 테스트 케이스 중 20개 성공 (71.4%)
- test_all_scenarios.py: 전체 테스트 케이스 검증 스크립트
* 4개 시나리오 × 7개 목표 = 28개 케이스 자동 검증
* 사용자 제공 정답과 비교 분석
- show_map_info.py: 맵 구조 분석 도구
* RFID 목록, 연결 정보, 갈림길 분석
* 노드 타입별 분류 및 통계
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
ScreenToWorld 함수를 Matrix 역변환 방식으로 변경하여
줌/팬 상태에서도 정확한 마우스 좌표 변환 구현.
좌측 영역 객체 선택 문제 해결.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- PathFinding 폴더를 Core, Validation, Planning, Analysis로 세분화
- 네임스페이스 정리 및 using 문 업데이트
- UnifiedAGVCanvas에 SetDockingError 메서드 추가
- 도킹 검증 시스템 인프라 구축
- DockingValidator 유틸리티 클래스 추가
- 빌드 오류 수정 및 안정성 개선
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 임시 테스트 파일들 삭제 (*.cs, *.exe, *.js, *.ps1)
- E2ETEST.md는 유지
- TODO.md 업데이트
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 목적지 선택 버튼을 경로 계산 그룹에 추가
- 목적지 선택 모드 상태 관리 구현 (버튼 색상 변경)
- UnifiedAGVCanvas에 SelectTarget EditMode 및 TargetNodeSelected 이벤트 추가
- 노드 클릭 시 목적지 자동 설정 및 경로 계산 기능
- 시뮬레이션 중 빠른 목적지 변경 및 테스트 지원
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- SimulatorForm에 GetDisplayName 헬퍼 메서드 추가
- 방향 전환 노드 로그에서 RFID 값 우선 표시
- RFID 없으면 (NodeID) 형태로 표시
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- DirectionChangePlanner에 GetDisplayName 헬퍼 메서드 추가
- RFID 값이 있으면 표시, 없으면 (NodeID) 형태로 표시
- 갈림길 정보 출력 시 사용자 친화적 형식 적용
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add real-time RFID duplicate validation in map editor with automatic rollback
- Remove RFID auto-assignment to maintain data consistency between editor and simulator
- Fix magnet direction calculation to use actual forward direction angles instead of arbitrary assignment
- Add node names to simulator combo boxes for better identification
- Improve UI layout by drawing connection lines before text for better visibility
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace NodeID with RFID values in path display for better field mapping
- Add ComboBoxItem<T> class for {rfid} - [{node}] format in combo boxes
- Implement GetRfidByNodeId helper method for NodeID to RFID conversion
- Enhanced UpdatePathDebugInfo to show both RFID and NodeID information
- Improved path visualization with RFID-based route display
- Users can now easily match displayed paths with physical RFID tags
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements to AGV navigation system:
• Consolidated RFID management into MapNode, removing duplicate RfidMapping class
• Enhanced MapNode with RFID metadata fields (RfidStatus, RfidDescription)
• Added automatic bidirectional connection generation in pathfinding algorithms
• Updated all components to use unified MapNode-based RFID system
• Added command line argument support for AGVMapEditor auto-loading files
• Fixed pathfinding failures by ensuring proper node connectivity
Technical changes:
- Removed RfidMapping class and dependencies across all projects
- Updated AStarPathfinder with EnsureBidirectionalConnections() method
- Modified MapLoader to use AssignAutoRfidIds() for RFID automation
- Enhanced UnifiedAGVCanvas, SimulatorForm, and MainForm for MapNode integration
- Improved data consistency and reduced memory footprint
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>