This repository contains def files for apptainer to create containers for some visual odometry algorithms. All of them run in ROS to ensure compatibility to reallife robots. The used ROS version is ROS Noetic from the DockerHub.
- [SVO] semi-direct monocular visual Odometry (Github)
- [PTAM] parallel tracking and mapping (Github)
- [DSO] direct sparse odometry (Github)
- Linux System
- Apptainer
The simplest way to start with all available algorithms is the provided install_all script. To use it simply give the script executable rights and execute it. You can find the install_all script in the scripts folder, called install_all.sh.
- Give execute rights
chmod +x install_all.sh
- execute script
./install_all.sh
To build a single algorithm container you need to compile the ros_base first. This container contains the basic ROS Noetic installation together with dependencies used across the algorithms. To do so just run following commands to use the provided script (found in scripts folder) :
- Give execute rigths
chmod +x install_ros_base.sh
- execute script
./install_ros_base.sh
To compile a specific container run its installation script (once again found in scripts folder) with the same commands as above. Just use the corresponding script instead of the ros_base one.
To run one of the installed containers just use the corresponding start_<algo>.sh script, where <algo> is one of the available in the scripts folder. To run SVO fro example :
- Give execute rigths (only one time needed if install_all.sh script isnt used before)
chmod +x start_svo.sh
- execute script to start container
./start_svo.sh
In the corresponding containers you can do the following :
- start roscore
roscore
- Continue with container specific commands :
- configure usb_cam.launch in /opt/ros/noetic/share/usb_cam/launch/usb_cam-test.launch and corresponsing configs
- start usb_cam
roslaunch usb_cam usb_cam-test.launch
- configure svo.launch in /svo_ws/src/rpg_svo/rqt_svo/src/rqt_svo/svo.launch
- start svo, svo gui and rviz
roslaunch rqt_svo svo.launch
ToDo
Testdata used is the Monocular Visual Odometry Dataset. For more information see this paper.
To start DSO run following command :
/workspace/dso/build/bin/dso_dataset \
files=../testdata/visual_odometry_testdata/<sequence_number>/images.zip \
calib=../testdata/visual_odometry_testdata/<sequence_number>/camera.txt \
gamma=../testdata/visual_odometry_testdata/<sequence_number>/pcalib.txt \
vignette=../testdata/visual_odometry_testdata/<sequence_number>/vignette.png \
preset=0 \
mode=0
Substitute the <sequence_number> with the corresponding sequence number from the dataset e.g. "sequence_42". The testdata needs to be in the "testdata" folder in the root of this project.
Further information :
ToDo
- See this paper for a photometrically calibrated benchmark for monocular visual odometry
- Camera calibration GitHub
- Create photometric calibration like TUM-Vision Mono Dataset
- Rolling shutter correction
- ROS Rolling shutter correction