A_Star_Algorithm_Path_Planning-master

所属分类:matlab编程
开发工具:matlab
文件大小:31KB
下载次数:1
上传日期:2021-04-06 14:37:16
上 传 者菜鸟11111Zzz
说明:  该存储库包含A Star算法的Python实现,用于在具有静态障碍物的环境中找到最短路径。在障碍物内部算法中,障碍物被硬编码为一组多边形,三角形和圆形class Obstacles。您可以通过修改此类轻松地创建自己的障碍。障碍物边界检查是通过使用半平面,坡度和截距概念来完成的。A Star算法涉及为每个新节点计算两个成本(运行成本和未来成本)。使用这两个成本,可以计算出从任何给定节点到达某个节点的总成本。从任何给定节点向八个方向生长节点,并计算所有新生成的节点的总成本。最终,当我们到达目标节点时,算法终止。我们维护所有生成的节点的字典,然后使用从尾到头的回溯原理获得最短路径。可视化是通过使用提供的MATLAB脚本单独完成的。
(The repository contains a python implementation of the a star algorithm to find the shortest path in an environment with static obstacles. In the algorithm of obstacle interior, the obstacle is hard coded into a group of polygons, triangles and circle class objects. You can easily create your own barriers by modifying this class. The barrier boundary inspection is done by using the concepts of half plane, slope and intercept. A star algorithm involves calculating two costs (operational cost and future cost) for each new node. Using these two costs, the total cost from any given node to a node can be calculated. Grow nodes from any given node to eight directions and calculate the total cost of all newly generated nodes. Finally, when we reach the target node, the algorithm terminates. We maintain the dictionary for all generated nodes, and then use the tail-to-head backtracking principle to get the shortest path. Visualization is done separately by using the MATLAB scripts provided.)

文件列表:
A_Star_Algorithm.py (13149, 2020-08-12)
A_Star_Algorithm_Nodes.csv (1175, 2020-08-12)
LICENSE (1069, 2020-08-12)
Visualization_Output.png (33194, 2020-08-12)
Visualization_Script.m (1172, 2020-08-12)

# A Star Algorithm - Path Planning This repository contains a Python implementation of an A Star algorithm for shortest path finding in an environment with static obstacles. The obstacles are hardcoded as a set of polygons, triangles and circles inside the algorithm inside the `class Obstacles`. You can easily create your own obstacles by modiying this class. The obstacle bounds checking is done by using half planes, slopes and intercepts concepts. The A Star algorithm involves calculation of two costs for every new node (cost to go and cost to come). Using these two costs, the total cost for reaching a node from any given node is calculated. The nodes are grown in eight directions from any given node and the total costs for all the newly generated nodes are calculated. Finally, when we arrive at our destination node, the algorithm terminates. We maintain a dictionary of all the generated nodes and then use the principle of backtracking from tail to head to get the shortest path. The visualization is done separately by using the provided MATLAB script. # Dependencies for running the code - MATLAB - Python 2.7 Interpreter - Any CSV file viewer like Microsoft Excel, Google Sheets, Libre Office, etc. # How to run the algorithm ? - First run the file `A_Star_Algorithm.py` - When the algorithm finishes perfectly, you will see the nodes being generated in `A_Star_Algorithm_Nodes.csv` - Finally, run the MATLAB script `Visualization_Script.m` # Visualization of the Shortest Path Generated from the Algorithm ![Shortest_Path_Output](Visualization_Output.png)

近期下载者

相关文件


收藏者