7.8 KiB
无人物流车转弯路径曲线化方案
1. 核心需求与思路分析
当前基于直线连接的路径在转弯处存在“瞬间转向”的非物理现象,导致仿真系统漏掉车辆在转弯时由于旋转(Swept Path)产生的碰撞 1。
简化策略:采用圆弧过渡法(Arc Fillet)。在任意两个路径段之间插入一段切圆弧。这种方法数学计算最少,且能完美描述 AGV 的恒定转向状态 3。
2. 关键算法实现逻辑
2.1 路径拓扑重构
为了解决原始点“失准”问题,逻辑上将路径视为**“控制点”与“物理边”**的组合 5:
- Waypoints (控制点):作为 Navisworks 中的操作手柄,用于定义路线走向。
- Edges (物理边):连接相邻控制点。转弯处会自动生成进入切点 (T_s) 和 退出切点 (T_e),两者之间的路径由直线变为圆弧。
2.2 几何计算流程 (3D 向量法)
假设连续三点 P_{i-1}, P_i, P_{i+1},预设半径为 R。
- 计算偏转角:求向量 vec{v}1(P{i-1}-P_i) 与 vec{v}2(P{i+1}-P_i) 的夹角 alpha。
- 计算切线长:L_t = R / tan(alpha/2) 8。
- 安全截断:若 L_t 超过线段长度的一半,自动将 L_t 缩减为长度的 45%,反推实际半径 R_{act}。
- 定位物理点:
- T_s = P_i + text{unit}(vec{v}_1) times L_t
- T_e = P_i + text{unit}(vec{v}_2) times L_t
3. 标准化数据结构说明 (参考 VDA 5050)
为保证与 DELMIA 兼容并支持 3D 导出,系统内部采用简化版的 VDA 5050 路径模型 10:
- Node (节点):存储原始 P_i 坐标及 ID。
- Edge (边):定义连接关系。
- 属性 trajectory:如果边是转弯处,则包含 ArcCenter、Radius、Ts、Te 信息。
- Export (导出):一键输出为 DELMIA 专用的 XML Tag Group 格式,将 T_s、T_e 及弧中点定义为路径标签(Tags) 。
4. 控制参数配置 (Navisworks 侧边栏)
| 参数类别 | 参数名称 | 说明 | 典型值 |
|---|---|---|---|
| 车辆参数 | 转向半径 (R) | 车辆物理允许的转弯半径。 | 1.5 m |
| 仿真精度 | 采样步长 (Delta s) | 碰撞检测时圆弧离散化的间距。 | 0.05 m |
| 局部控制 | 半径覆盖 | 在点列表中,允许单独为某个急转弯设置小半径。 | - |
| 导出设置 | 文件格式 | 导出 DELMIA XML 或 CSV 坐标序列。 | XML |
5. 核心 C# 实现示例 (Navisworks API)
C#
using Autodesk.Navisworks.Api; // 仅依赖基础几何库
public struct SmoothTurn {
public Point3D Ts, Te; // 物理切点
public double ActualRadius;
public bool IsValid;
}
public class PathEngine {
// 核心:计算圆弧平滑参数
public SmoothTurn CalculateFillet(Point3D pPrev, Point3D pCurr, Point3D pNext, double R) {
Vector3D v1 = (pPrev - pCurr).Normalize();
Vector3D v2 = (pNext - pCurr).Normalize();
// 1. 计算夹角并求切线长 Lt
double angleRad = Math.Acos(Vector3D.DotProduct(v1, v2));
double Lt = R / Math.Tan(angleRad / 2.0);
// 2. 安全截断检查 (防止圆弧过大)
double limit = Math.Min((pPrev-pCurr).Length, (pNext-pCurr).Length) * 0.45;
if (Lt > limit) {
Lt = limit;
R = Lt * Math.Tan(angleRad / 2.0);
}
return new SmoothTurn {
Ts = pCurr + v1 * Lt,
Te = pCurr + v2 * Lt,
ActualRadius = R,
IsValid = true
};
}
// 生成用于 Navisworks 碰撞检测的离散位姿序列 [12, 13]
public List<Point3D> SampleArc(SmoothTurn turn, int sampleCount = 10) {
// 基于 Ts 和 Te 在圆弧平面内进行线性角度插值,输出点序列供仿真引擎使用
return new List<Point3D>();
}
}
6. 高精度碰撞仿真策略:扫掠分析 (Swept Path)
在 Navisworks 中,不仅检查中心线,还要利用车辆宽度(轮距)生成 OBB 包围盒序列 1:
- 位姿切片:在圆弧段按“采样步长”生成密集的车辆外框实例。
- SAT 判定:对每个实例执行分离轴定理检测。由于圆弧段是连续生成的,这能有效检出内轮差碰撞风险。
7. 结论
本方案在不增加系统复杂度的前提下,通过**“控制点驱动、物理点执行”**的逻辑,实现了 Navisworks 3D 环境下的高保真路径仿真。其导出的 XML Tag Group 格式确保了数据能无缝进入 DELMIA 进行更深度的流程验证。
Works cited
- Turning Vehicle Simulation: Interactive Computer-Aided Design and Drafting Application, accessed December 30, 2025, https://onlinepubs.trb.org/Onlinepubs/trr/1995/1500/1500-001.pdf
- Step-by-Step Guide to Conducting a Swept Path Analysis - Quantum Traffic, accessed December 30, 2025, https://www.quantumtraffic.com.au/step-by-step-guide-to-conducting-a-swept-path-analysis
- Curved Paths - Red Blob Games, accessed December 30, 2025, https://www.redblobgames.com/articles/curved-paths/
- PRM Path Smoothening by Circular Arc Fillet Method for Mobile Robot Navigation - DergiPark, accessed December 30, 2025, https://dergipark.org.tr/tr/download/article-file/3067231
- Smoothed A* Algorithm for Practical Unmanned Surface Vehicle Path Planning - UCL Discovery, accessed December 30, 2025, [https://discovery.ucl.ac.uk/10064237/3/Liu Smoothed A algorithm for practical unmanned surface vehicle path planning.pdf](https://discovery.ucl.ac.uk/10064237/3/Liu Smoothed A algorithm for practical unmanned surface vehicle path planning.pdf)
- AGV PATH PLANNING BASED ON SMOOTHING A* ALGORITHM, accessed December 30, 2025, https://airccse.org/journal/ijsea/papers/6515ijsea01.pdf
- Iterative Learning-Based Path and Speed Profile Optimization for an Unmanned Surface Vehicle - PMC - NIH, accessed December 30, 2025, https://pmc.ncbi.nlm.nih.gov/articles/PMC7014130/
- An Algorithm for Polygons with Rounded Corners - Gorilla Sun, accessed December 30, 2025, https://www.gorillasun.de/blog/an-algorithm-for-polygons-with-rounded-corners/
- AG Corners Live Effect | Astute Graphics Documentation, accessed December 30, 2025, https://docs.astutegraphics.com/vectorscribe/ag-corners-live-effect
- Path planning for autonomous vehicles using clothoid based smoothing of A* generated paths and optimal control - DiVA portal, accessed December 30, 2025, https://www.diva-portal.org/smash/get/diva2:1150741/FULLTEXT01.pdf
- (PDF) An Efficient Centralized Planner for Multiple Automated Guided Vehicles at the Crossroad of Polynomial Curves - ResearchGate, accessed December 30, 2025, https://www.researchgate.net/publication/355863030_An_Efficient_Centralized_Planner_for_Multiple_Automated_Guided_Vehicles_at_the_Crossroad_of_Polynomial_Curves
- Preparing Swept Path Analysis' | Invarion Help Center, accessed December 30, 2025, https://help.invarion.com/rapidpath-online/swept-path-analysis/preparing-swept-path-analysis/