Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

A* search algorithm for the autonomous mission of University Rover Challenge

How does it work?

Given n coordinates (x,y) of the location of the targets where the rover needs to be moved to, the algorithm calculates the distance to each of them, moves to the closest one and draw the route; where the new starting position of the rover is established and the algorithm is repeated until the rover is at the last target

Libraries:

  • pathfinding 1.0.1
  • pygame 2.1.2

Map

The map actually consists of an array of zeros and ones where each zero is a coordinate the rover cannot pass. Only one image was overlaid on top of the matrix to show the map in the game window.

Colors paths

The colors of the routes correspond to:

White - Path from start coordinate to first target

Gray - Path from first to second target

Black - Path from second to third objective

In this case there are 3 objectives, if more are added, more colors would have to be added to the list called colors of the create_path function. Or in any case you can modify the colors for the three routes in that same list.

Chance the targets

To change the coordinates of the objectives or add more, you must change the list called objectives at the beginning of the code as well as the list called points in the create_path function.

As well as you can change the coordinate of the initial position in start at the beginning of the code and starts in the create_path function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages