Skip to content

It's a astar algorithm for topological map format. The map format is highly flexible including one way edge. The algorithm will return shortest path considering reduce turning.

License

Notifications You must be signed in to change notification settings

ali850608/A-star-with-least-turning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A star with least turning

A modified a star algorithm for topological map to generate a shortest path considering turning weight. It calculates the angle between the current vertex' parent, current vertex, and the next vertex. If it is a turn, add an extra g value to that node. By doing so, we can get a shortest path considering turning weight.

Usage

The code requires the external library boost. If you are using Ubantu, you can install it simply by

sudo apt install libboost-all-dev

If neither of the above method works, you can also follow the instructions on the boost website and install it manually.

After you installed boost and downloaded the source code, go into the directory of the source code and compile it with CMake:

cmake .
make

Then, you are able to run the code:

./ASTAR_least_turning -m twenty_robots -s l06 -g r01
  • m: the map file in dot format
  • s: the start label
  • g: the goal label

You can define your owned turning weight in "A-star-with-least-turning/src/graph_utils.cpp" isTurning founction

The idea is that if the robot is doing turning, then it will add extra g_value to the node. Hence, when the a star calculates the shortest path, the turning will be considered.

License

PBS is released under USC – Research License. See license.md for further details.

About

It's a astar algorithm for topological map format. The map format is highly flexible including one way edge. The algorithm will return shortest path considering reduce turning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.6%
  • CMake 0.4%