Skip to content

A-star Pathplanning Visualization written in C++ with 3 degrees of freedom

Notifications You must be signed in to change notification settings

tom21100227/Astar-Visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A-star Visualization for Robot Path Planning

This project performs A* search on a robot that have 3 degrees of freedom (x,y, theta). And navigated the robot from start point to goal point across user defined polyogn obstacles. Originally developed for CSCI 3250 - Computational Geometry at Bowdoin College. All class related code except for OpenGL are removed.

short_demo.mov
full_demo.mov

Getting Started

For Regular

Compile the code by running the following command in the terminal:

$ make

Run the code

$ ./motion

With Audio.

First, ensure that you installed the required libraries (SFML). If not, run the following command in the terminal:

$ brew install sfml

Compile the code by running the following command in the terminal:

$ make audio

Run the program

./motion_with_audio

Use Instruction

Run program with ./motion or ./motion_with_audio. You might need to configure the include path if you didn't use homebrew to install SFML.

Draw Obstacles

  • Press s to start drawing obstacles.
  • Press n to start drawing the next obstacle.
  • Press z to undo last polygon.
  • Press e when you're done drawing the obstacle.

Draw Robot (and start point).

  • Once you pressed e to finish drawing the obstacle, the next point you click will be the robot's starting point, and the first vertex of the robot.
  • Click the next point to draw the second vertex of the robot.
  • Press e to finish drawing the robot.

Draw Goal Point

  • Click the goal point.

Run A* Search

  • Press v to run A* search.
  • Press t to switch between the three visualization modes (No visualization, states as points, or states as robots).

Note that visualization is EXTREMELY slow. Even though path planning is in a separate thread, the visualization would froze path planning (mutex). For reference: Visualization

Replay

  • Once path planning is done, you can press r to replay the path.

About

A-star Pathplanning Visualization written in C++ with 3 degrees of freedom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published