Skip to content

Add Dijkstra-based global path planner - #31

Merged
ShisatoYano merged 1 commit into
ShisatoYano:mainfrom
Ashish080213:dijkstra-path-planner
Jan 8, 2026
Merged

ShisatoYano merged 1 commit into
ShisatoYano:mainfrom
Ashish080213:dijkstra-path-planner

Conversation

@Ashish080213

@Ashish080213 Ashish080213 commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Description: Dijkstra Path Planning Implementation for Autonomous Vehicles

This pull request introduces a Dijkstra-based global path planning algorithm to the Autonomous Vehicle Control Beginners Guide. The implementation provides a baseline optimal planner without heuristic bias.

Motivation

Dijkstra’s algorithm serves as a fundamental shortest-path baseline for autonomous navigation.
Adding this planner enables direct comparison with heuristic-based planners such as A*.

A* Algorithm Cost Function (In this repository)

Node-to-Node Cost is Fixed = 1
g(n) += Node-to-Node Cost
Heuristic Function h(n) -> Weighted Manhattan Distance = w * (|n_x - g_x| + |n_y - g_y|)
where:

  • n: current node
  • g: goal node

Total Cost f(n) = g(n) + h(n)
g(n) = cost from start node to current node n
h(n) = heuristic estimate from current node n to goal node g
When h(n) = 0, A* becomes Dijkstra

Key Changes from A* to Dijkstra

Node-to-Node Cost -> Euclidean Distance = sqrt( (n1_x - n2_x)^2 + (n1_y - n2_y)^2 )
g(n) += Node-to-Node Cost
Removed Heuristic Function
where:

  • n1: current node
  • n2: neighbouring node

Total Cost f(n) = g(n)
g(n) = cost from start node to current node
Added Unit Test File
Updated README File

Testing

Verified shortest-path optimality on grid-based maps.
Tested planner behavior on multiple start–goal configurations.

dijkstra_search

dijkstra_navigate

@ShisatoYano

Copy link
Copy Markdown
Owner

@Ashish080213 Thank you so much for the PR! This looks great. I'm a bit tied up right now, but I'll review it in detail and get back to you soon. Please bear with me for a bit!

@ShisatoYano
ShisatoYano self-requested a review January 7, 2026 18:50
@ShisatoYano ShisatoYano added the enhancement New feature or request label Jan 7, 2026
@ShisatoYano

Copy link
Copy Markdown
Owner

Great work! I particularly liked how you wrote those descriptions in the issue and the PR in detail including algorithm and implementation policy. Merging this PR now. Thank you for contributing to my OSS!!

@ShisatoYano
ShisatoYano merged commit 41b5db3 into ShisatoYano:main Jan 8, 2026
2 of 3 checks passed
@Ashish080213

Copy link
Copy Markdown
Contributor Author

Thank you for the review and for merging the PR. I appreciate the opportunity to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants