First compile g2o and DBoW in the thirdparty folder. Then compile orb slam.
mkdir build
cd build
cmake ..
make -j
Extract the vocabulary file under Vocabulary folder
under your orb_slam2_astra folder, run this command:
./bin/rgbd_astra ./Vocabulary/ORBvoc.txt ./Examples/RGB-D/astra.yaml