This is the first project of Udacity C++ Nano Degree program. The main goal is to use A* search algorithm to find a path between two points in a real 2D map. The data used in this project is taken from the open-source OpenStreetMap project. The map used in this project is renedered using the 2D graphic library IO2D and the map rendering example provided in this library repository.
- Cmake and GCC:
sudo apt update
sudo apt install build-essential
sudo apt install cmake
- IO2D Library README.md
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev
git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install
To compile the project, first, create a build
directory and change to that directory:
mkdir build && cd build
From within the build
directory, then run cmake
and make
as follows:
cmake ..
make
The executable will be placed in the build
directory. From within build
, you can run the project as follows:
./OSM_A_star_search
Or to specify a map file:
./OSM_A_star_search -f ../<your_osm_file.osm>
The testing executable is also placed in the build
directory. From within build
, you can run the unit tests as follows:
./test
- Fedi Salhi FediSalhi