fix: Add motor direction parameter to magnet direction calculation in pathfinding

- 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>
This commit is contained in:
backuppc
2025-10-24 15:46:16 +09:00
parent 3ddecf63ed
commit d932b8d332
47 changed files with 7473 additions and 1088 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using AGVNavigationCore.Models;
namespace AGVMapEditor.Models
@@ -237,15 +238,30 @@ namespace AGVMapEditor.Models
[Category("이미지")]
[DisplayName("이미지 경로")]
[Description("이미지 파일 경로")]
// 파일 선택 에디터는 나중에 구현
[Description("이미지 파일 경로 (... 버튼으로 파일 선택)")]
[Editor(typeof(ImagePathEditor), typeof(UITypeEditor))]
public string ImagePath
{
get => _node.ImagePath;
set
{
_node.ImagePath = value ?? "";
_node.LoadImage(); // 이미지 다시 로드
if (string.IsNullOrEmpty(value))
{
_node.ImagePath = "";
return;
}
// 파일이 존재하면 Base64로 변환하여 저장
if (System.IO.File.Exists(value))
{
_node.ConvertImageToBase64(value);
_node.LoadImage(); // 이미지 다시 로드
}
else
{
_node.ImagePath = value;
}
_node.ModifiedDate = DateTime.Now;
}
}