Visual odometry (VO) is the process of determining the position and orientation (ego-motion) of a robot/agent by analyzing images taken from a monocular or stereo camera system attached to the robot/agent. Visual Odometry operates by estimating the pose of the robot/agent by analyzing the changes that motion induces on the images of its onboard cameras.
- Ubuntu with VSCode for best implementation (Open this cloned repository as a folder in VSCode)
- OpenCV (C++): Steps for Installation
- GNUplot: sudo apt install gnuplot (Optional: Only to generate plots from the .dat files)
IMPORTANT: You will also need the KITTI Dataset of grayscale sequences. Download
Once downloaded, extract the Sequences folder into the Dataset folder such that the structure is like:
- If running from VSCode, open the folder Visual-Odometry in the VSCode navigator. Then open the
main.cpp
file in the code editor and pressCtrl + Shift + B
to build the code. Then run the following command in the terminal below:
./src/build/main 00
Replace 00 with sequence number to run other sequences
- If running from terminal, go to the parent folder of this repo, that is, Visual-Odometry and enter the command:
g++ -g src/main.cpp -o src/build/main `pkg-config --cflags --libs opencv4`