Upload
lamanh
View
216
Download
0
Embed Size (px)
Citation preview
Euclid ORB SLAM Walkthrough
Setup Clone ORB SLAM2 from the repository:
https://github.com/raulmur/ORB_SLAM2
You may need to add the following line to the file “src/ORBextractor.cc” :
You will need to add the following lines to “include/System.h” :
Build ORB SLAM as instructed.
Before building the ROS examples, make sure you have used “sudo rosdep fix-permissions”
and “rosdep init” at least once on your device (with an internet connection). Then build the
ROS examples as instructed in the repository.
Camera calibration In order to use ORB SLAM, you will need to calibrate your camera.
Print out a checkerboard from here:
http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration?action=AttachFile&d
o=view&target=check-108.pdf
On your Euclid, run the camera node:
#include <opencv2/opencv.hpp>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
$ roslaunch realsense_camera lr200m_camera_nodelet.launch
Then execute:
Make sure to put the size of the square on your target, and choose the camera you want to
calibrate.
A calibration GUI will open and you will be needed to move the Euclid in different angles and
distances from the target (make sure you see an indication that the target has been
recognized). Once it captured enough images, you will need to choose “Calibrate” in the
GUI. The program will freeze for several seconds/minutes. After the calculation finishes, you
will be able to click “save” to save the calibration results into a tar file.
Copy the tar file in /tmp/calibrationdata.tar.gz to a more accessible location and open the
ost.yaml file in it.
Make a copy of one of the yaml files in ORB/Examples/Mono/ and name it
<rgbd\mono>_euclid.yaml. Fill in the corresponding fields as shown:
$ rosrun camera_calibration cameracalibrator.py --size 10x8 --square 0.023
image:=/camera/<color\fisheye>/image_raw
Running ORB SLAM Each mode in ORB SLAM requires different camera topics. We have prepared launch files for
the camera for RGBD and Mono.
Open two terminals. In the first one execute:
In the second terminal execute:
After loading the vocabulary you will be able to begin mapping:
$ roslaunch euclid_mono\rgbd_orbslam.launch
$ rosrun ORB_SLAM2 Mono\RGBD <path_to_orb_vocabulary>/ORBvoc.txt
<path_to_calibration_file>