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
Compile the code by running the following command in the terminal:
$ make
Run the code
$ ./motion
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
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.
- 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.
- 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.
- Click the goal point.
- 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:
- Once path planning is done, you can press
r
to replay the path.