Implementation of Monocular Simultaneous Localization and Mapping (SLAM) using inertial sensors. This implementation used OpenCV 3.2 and ROS Kinect.
VI-SLAM is a free and open source licensed under the GPL-3.0 License.
- OpenCV 3.2 and extra modules.
- ROS Kinetic.
From a fresh Ubuntu 16.04 LTS, install the following dependencies:
Refer to OpenCV.
Refer to ROS Kinetic installation instructions.
Clone VI-SLAM repository in the /src
folder of your catkin workspace:
cd <catkin_ws_directory>/src
git clone https://github.com/MecatronicaUSB/vi-slam.git
cd ..
catkin_make
Run VI-SLAM on a dataset of images with known camera calibration parameters and image dimensions and sampling rate of camera and IMU.
Modify the calibration.xml
file in /calibration
folder to specify the instrinsic parameters of the camera of the dataset to use.
-d <directory of images files>
-c <directory of calibration.xml file> (<vi-slam directory>/calibration/calibration.xml)
-s <number of starting frame> (Default: 0)
Modify the vi_slam.launch
file in /launch
folder to specify the directory of files
(Refer to /calibration/calibrationEUROC.xml
for proper configuration of the .xml file).
<!-- Images dimensions (Input) -->
<in_width type_id="integer"> W </in_width> (Input dimentions of images)
<in_height type_id="integer"> H </in_height> (Replace W: width, H: height)
<!-- Images dimensions (Output) -->
<out_width type_id="integer"> W </out_width> (Output desired dimentions of images)
<out_height type_id="integer"> H </out_height> (Replace W: width, H: height)
<!-- Calibration Values of Dataset -->
<calibration_values type_id="opencv-matrix"> (Intrinsic camera parameters)
<rows>1</rows> (Replace fx fy cx cy)
<cols>4</cols>
<dt>f</dt>
<data>
fx fy cx cy </data></calibration_values>
<!-- Distortion coefficients -->
<rectification type_id="opencv-matrix"> (Distortion parameters, optional)
<rows>1</rows> (Replace k1 k2 k3 k4)
<cols>4</cols> (If not: 0 0 0 1)
<dt>f</dt>
<data>
k1 k2 k3 k4 </data></rectification>
Run VI-SLAM for general datasets:
roslaunch vi_slam vi_slam.launch
Currently, VI-SLAM supports ground-truth visualization along with VI-SLAM results for EUROC MAV datasets. For these datasets, corresponding calbration.xml
files are located in the /calibration
folder.
For EUROC MAV datasets, modify the arguments of the vi_slamEUROC.launch
file in /launch
folder to add the directory of the files.
-d <directory of images files> (<EUROC directory>/mav0/cam0/data/)
-c <directory of calibrationEUROC.xml file> (<vi-slam directory>/calibration/calibrationEUROC.xml)
-s <number of starting frame> (Default: 0)
--EUROC <directory of ground-truth poses file> (<EUROC directory>/mav0/vic0/data.csv)
Run VI-SLAM for EUROC datasets:
roslaunch vi_slamvi_slamEUROC.launch
- Implementation done in C++.
- Using Rviz as visualization tool.
Core .cpp files of VI-SLAM.
Libraries .h files of VI-SLAM.
VI-SLAM launch files for easy ROS Kinetic execution.
Calibration files. Includes calibration for EUROC datasets. It can be modified for local datasets.
Copyright (c) 2019 Luis Lujano ([email protected]).
Release under the GPL-3.0 License.