Dijkstra-Path-Planning-Mobile-Robot.zip
大小:5.52MB
价格:19积分
下载量:0
评分:
5.0
上传者:qq_50150617
更新日期:2025-09-22

Dijkstra算法求解机器人路径规划问题Python程序

资源文件列表(大概)

文件名
大小
Dijkstra-Path-Planning-Mobile-Robot-main/
-
Dijkstra-Path-Planning-Mobile-Robot-main/Dijkstra_Algorithm/
-
Dijkstra-Path-Planning-Mobile-Robot-main/Dijkstra_Algorithm/Dijkstra.py
10.96KB
Dijkstra-Path-Planning-Mobile-Robot-main/Dijkstra_Algorithm/README.md
557B
Dijkstra-Path-Planning-Mobile-Robot-main/README.md
2.17KB
Dijkstra-Path-Planning-Mobile-Robot-main/images/
-
Dijkstra-Path-Planning-Mobile-Robot-main/images/Action_Set.jpg
76.26KB
Dijkstra-Path-Planning-Mobile-Robot-main/images/Exploration_Map.png
23.31KB
Dijkstra-Path-Planning-Mobile-Robot-main/images/Obstacle_Map.png
17.82KB
Dijkstra-Path-Planning-Mobile-Robot-main/images/Shortest_Path_Map.png
26.5KB
Dijkstra-Path-Planning-Mobile-Robot-main/images/Video_Output.mp4
9.97MB

资源内容介绍

Dijkstra算法是一种解决单源最短路径问题的算法,适用于带权的有向图或无向图。它采用贪心策略,逐步找到从源点到其他所有顶点的最短路径。Dijkstra算法的基本思路是以起始点为中心,向外层层扩展,直到覆盖所有顶点。算法维护一个距离数组(通常记为dis),用来记录源点到每个顶点的最短距离估计,以及一个集合(通常记为S),用来存放已经确定最短路径的顶点。初始时,源点的路径权重赋为0,如果存在直接到达的边,则将邻接顶点的路径长度设为边的权重;对于不存在直接到达的边,则将路径长度设为无穷大。算法不断选取距离最短且未处理过的顶点,更新其邻接顶点的距离,直到所有顶点的最短路径都已确定。
<!-- Download the zip file to a folder of your choice and extract the zip fileIn it open the "Dijkstra.py" file in any IDE of your choice, preferably VS CodeHit the run button in the IDE and the code will prompt you for inputs, give the necessary inputsIf acceptable inputs are given, the code will run and execute the Dijkstra algorithm and generate the shortest pathOnce the path is generated, it will plot all the visited nodes and then the path of the travelYou can try for different inputs as required, as long as they are accepted by the program --># DIJKSTRA - Path Planning Algorithm for a Point RobotThe task was to designing a point robot that would traverse a map where the obstacels are already known to us. <br>We have a point robot that can move in eight directions and each action would have its respective costs.![Action Set](./images/Action_Set.jpg)## Defining the mapWe use the concepts of Algebraic Half planes to define the free space and the obstacles.<br>![Obstacle Map](./images/Obstacle_Map.png)## Exploring the MapUse the defined actions set and as per the cost for each step, we traverse the graph```Action Sets = {(1,0), (-1,0), (0,1), (0,-1), (1,1), (-1,1),(1,-1),(-1,-1)}```In each action set generated we check if the new position is going to end up in the obstacle space.![Exploration Map](./images/Exploration_Map.png)## Optimal pathAfter we explore the entire map, we use backtracking to find the path with the least cost. <br> The operation of the algorithm is shown below. <br>![Shortest Path Map](./images/Shortest_Path_Map.png)## Usage* Clone the repo to your local machine```git clone https://github.com/HemanthJoseph/Dijkstra-Path-Planning-Point-Robot.git```* Change Directory```cd Dijkstra_Algorithm```* Run the python file```python Dijkstra.py```* In the command line enter the inputs values for start and goal coordinates and ensure that the points don't fall in the obstacles as the program will keep prompting you to enter points that aren't in the obstacle space.## Dependencies and libraries1. Python 32. Matplotlib3. Queue## Video Linkhttps://drive.google.com/file/d/1XJp1R0PteTrX_R4la_C7ffUnGrDoOqul/view?usp=share_link

用户评论 (0)

发表评论

captcha