Visual Slam for Jetson devices
166
Rollo_SLAM is a real-time SLAM library for Monocular and RGB-D cameras that computes the camera trajectory and a sparse 3D reconstruction (in the RGB-D case with true scale). It is able to detect loops and relocalize the camera in real time.
SD-SLAM is released under a GPLv3 license.
We have tested the library in Ubuntu 16.04, but it should be easy to compile in other platforms.
We use Pangolin for visualization and user interface. Dowload and install instructions can be found at: https://github.com/stevenlovegrove/Pangolin.
We use OpenCV to manipulate images and features. Dowload and install instructions can be found at: http://opencv.org. Required at leat 2.4.3. Tested with OpenCV 2.4.11 and OpenCV 3.2.
We use Eigen3 to perform matrices operations. Download and install instructions can be found at: http://eigen.tuxfamily.org. Required at least 3.1.0.
We use modified versions of the g2o library to perform non-linear optimizations. This library (which is BSD) is included in the extra folder.
We use ZED for grabbing rgb and depth images. Dowload and install instructions can be found at: https://www.stereolabs.com/developers/release/#sdkdownloads_anchor.
Clone the repository:
git clone https://github.com/rollo/rollo_slam
We provide a script build.sh to build Rollo_SLAM. Please make sure you have installed all required dependencies (see section 2). Execute:
cd rollo_slam
chmod +x build.sh
./build.sh
Inside PATH_TO_SEQUENCE_FOLDER there must be a file named files.txt with each image filename.
./Examples/Monocular/monocular Examples/Monocular/X.yaml PATH_TO_SEQUENCE_FOLDER
You can use a USB camera to run Rollo-SLAM with live images. Change N to the proper /dev/videoN value where your camera is connected.
./Examples/Monocular/monocular Examples/Monocular/X.yaml N
You must provide an associations file which can be created using the python script associate.py located inside Examples/RGB-D folder and executing:
python Examples/RGB-D/associate.py PATH_TO_SEQUENCE/rgb.txt PATH_TO_SEQUENCE/depth.txt > associations.txt
./Examples/RGB-D/rgbd Examples/RGB-D/X.yaml PATH_TO_SEQUENCE_FOLDER ASSOCIATIONS FILE
Run Rollo_SLAM directly on .SVO file to avoid creating large sequence folders:
./Examples/ZED/rollo_zed Examples/ZED/X.yaml PATH_TO_SVO_FILE [0|1](Save Map?)
To set up the settings file for a ZED Camera, go to /usr/local/zed/settings/X.conf and use the calibration parameters to replace the ones in Examples/ZED/ZED-720p.yaml.
Inside PATH_TO_SEQUENCE_FOLDER there must be a file named ''files.txt'' with each image filename. IMU data has to be stored in a csv file where each line has a timestamp and 6 measurements (3 from gyroscope and 3 from accelerometer).
./Examples/Fusion/monocular_imu Examples/Monocular/X.yaml PATH_TO_SEQUENCE_FOLDER IMU_DATA_FILE.csv
You will need to create a settings file with the calibration of your camera. See the settings file provided for the TUM dataset for monocular or RGB-D cameras. We use the calibration model of OpenCV. See the examples to learn how to create a program that makes use of the Rollo-SLAM library and how to pass images to the SLAM system. RGB-D input must be synchronized and depth registered.
We provide a tool to calibrate your camera using the calibration model of OpenCV. You need to print the pattern found inside Examples/Calibration folder and take several pictures of this pattern from different points of view. Then store these pictures in a folder and execute the calibration tool.
./Examples/Calibration/calibration PATH_TO_IMAGES_FOLDER
Inside PATH_TO_IMAGES_FOLDER there must be a file named ''files.txt'' with each image filename.
You can check if the intrinsic parameters calculated are accurate checking the rectified images stored in PATH_TO_IMAGES_FOLDER.
Mapping data can be stored in a YAML file, located in the Map folder. You can save the current map at any moment pressing the Stop and Save button, or it will be created automatically when a sequence is completed.
Saved data can be loaded afterwards by adding PATH_TO_SAVED_MAP_YAML as an extra parameter when running
You can change between the Default Mode and Localization mode using the GUI of the map viewer.
The system runs in parallal three threads: Tracking, Local Mapping and Loop Closing. The system localizes the camera, builds a new map and tries to close loops.
This mode can be used when you have a good map of your working area. In this mode the Local Mapping and Loop Closing are deactivated. The system localizes the camera in the map (which is no longer updated), using relocalization if needed.
When loading existing map, begin in localization mode and switch to default mode as soon as tracking is lost, but continue to relocalize in existing map using estimated pose.
Dockerfiles are provided under the /docker directory and the image is available in DockerHub. You can, of course, modify the Dockerfiles and build your own images.
Rollo_SLAM is built under /opt/rollo_slam inside the Docker container.
docker pull tommyhannan/visual_slam:latest
You have to use "-v" to mount your local data directory into the container. Check Docker doc for more detailed information.
docker run -it --rm -v "path_to_local_data":/mounted-data tommyhannan/visual_slam:latest
docker build -t "username"/visual_slam:latest ./docker/
docker build -t "username"/visual_slam_jetson:latest ./docker/Jetson
Content type
Image
Digest
Size
390.4 MB
Last updated
about 7 years ago
docker pull tommyhannan/visual_slam_jetson