Giter VIP home page Giter VIP logo

stereo-dso's Introduction

Direct Sparse Odometry with Stereo Cameras

Stereo DSO


Stereo DSO is a real-time stereo SLAM system based on DSO. It is developed by members of Autonomous Driving Group at Horizon Robotics, Inc. It runs on laptops with CPU and provides localization and mapping services for self-driving cars. A demonstration is provides to showcase its capability.

Related Papers:

  • Direct Sparse Odometry, J. Engel, V. Koltun, D. Cremers, In arXiv:1607.02565, 2016
  • Large-scale direct SLAM with stereo cameras, J. Engel, J. Stückler, D. Cremers, IROS, 2015

1. Installation

Please follow https://github.com/JakobEngel/dso.

2. Usage

See https://github.com/JakobEngel/dso for how to run on a dataset. Run on a dataset from http://www.cvlibs.net/datasets/kitti/eval_odometry.php using:

	bin/dso_dataset \
		files=XXXXX/sequence_XX \
		calib=XXXXX/sequence_XX/para/camera.txt \
		gamma=XXXXX/sequence_XX/para/pcalib.txt \
		vignette=XXXXX/sequence_XX/para/vignette.png \
		preset=0 \
		mode=1

Under sequence_XX, there should be two image datasets called image_0 and image_1, which are left and right image sets. Note that mode is set to 1 because we do not have photometric calibration. Besides, gamma and vignette are not required to run the code. That is, a minimal exampel to run on a kitti dataset is:

	bin/dso_dataset \
		files=XXXXX/sequence_XX \
		calib=XXXXX/sequence_XX/para/camera.txt \
		preset=0 \
		mode=1

2.1 Dataset Format

All the dataset format is same as DSO except the calib file. The format of geometric calibration file is slightly different because of the involved stereo disparity.

Geometric Calibration File.
Calibration File for Pre-Rectified Images
Pinhole fx fy cx cy 0
in_width in_height
"crop" / "full" / "none" / "fx fy cx cy 0"
out_width out_height
baseline
Calibration File for FOV camera model:
FOV fx fy cx cy omega
in_width in_height
"crop" / "full" / "fx fy cx cy 0"
out_width out_height
baseline
Calibration File for Radio-Tangential camera model
RadTan fx fy cx cy k1 k2 r1 r2
in_width in_height
"crop" / "full" / "fx fy cx cy 0"
out_width out_height
baseline
Calibration File for Equidistant camera model
EquiDistant fx fy cx cy k1 k2 r1 r2
in_width in_height
"crop" / "full" / "fx fy cx cy 0"
out_width out_height
baseline

note: baseline is in meters.

2.2 Run Mode

Two modes MODE_SLAM and MODE_STEREOMATCH can be set in main_dso_pangolin.cpp. If MODE_STEREOMATCH is true, it will do stereo matching and output the idepth map given a pair of stereo images.

3. Pipeline

This work is mostly inspired by Large-scale direct SLAM with stereo cameras. Temporal and static stereo are combine in a direct, real-time capable SLAM method. Key frame and nonkey frame are processed differently in depth map estimation. When a new Keyframe is initialized, we perform static stereo to update and prune the propagated depth map. The nonkey frame is used to refine the depth map of key frame. See ImmaturePoint::traceStereo for Static Stereo Depth Estimation. See CoarseTracker::makeCoarseDepthL0 and FullSystem::traceNewCoarseNonKey for depth propogation. See CoarseInitialzer::setFirstStereo and FullSystem::InitializeFromInitialzier for stereo initialization.

4. Experiments

We tested stereo DSO on kitti datasets and datasets we collect including highway, park and garage. It performs better than DSO in degrees of scale, accuracy, robustness and speed. Below is the trajectory that DSO runs on Kitti 05. We can see that the scale of DSO is much smaller than groud truth.

05dso

Stereo DSO can achieve much better accuracy and faster speed:

05sdso

It is evaluated that stereo DSO achieves about 1.1% ~ 4.2% translation error, 0.001deg/m ~ 0.0053deg/m rotation error, with running time of 53ms per frame.

05tl

05rl

We also tested stereo DSO on Kitti 00. It achieves about 1.3% ~ 3.7% translation error, 0.002 deg/m ~ 0.007deg/m rotation error, with running time of 56ms per frame.

00sdso

00tl

00rl

In conlcusion, stereo DSO have several advantages comparing with DSO:

  • No need to initialize. Stereo DSO initializes immediately.
  • Much better scale and accuracy. DSO performs bad on kitti dataset, especially in scale measurements. Stereo DSO reduced the translation and rotation error largely.
  • Real-time speed. Stereo DSO runs at typically 20 frames per sec.
  • Robustness. Stereo DSO seldomly gets lost, but DSO usually fails to initialize if the movement during initialization is not large enough.

5. Acknowledgements

Stereo DSO is developed at Horizon Robotics, Inc. Our work is based on DSO. We are still working for improving the performance. Welcome to contribute to Stereo DSO or ask any issues via Github or contacting [email protected].

stereo-dso's People

Contributors

jiatianwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stereo-dso's Issues

Clarification on Camera Calibration File

The last element in the camera calibration file is "disparity" which should be in meters. Is this supposed to be the baseline parameter depicting the distance between the nodal points of the left and right cameras?

Clarification on camera calibration

So you do not need the extrinsic camera calibration parameters at all, How is the initialization done? And I am wondering if the intrinsic parameters for the second camera are not used or the two cameras are assumed equivalent?

ERROR: dont't have photometric calibation.

hansrajpabbati@hansrajpabbati-Inspiron-5537:~/Desktop/DSO/Work/Dso_Sparse/dso/build$ bin/dso_dataset files=/home/hansrajpabbati/Data_Odometry/dataset/sequences/01.zip calib=/home/hansrajpabbati/Desktop/DSO/Work/camera_2.txt preset=0 mode=0
loading data from /home/hansrajpabbati/Data_Odometry/dataset/sequences/01.zip!
loading calibration from /home/hansrajpabbati/Desktop/DSO/Work/camera_2.txt!

=============== PRESET Settings: ===============
DEFAULT settings:

  • no real-time enforcing
  • 2000 active points
  • 5-7 active frames
  • 1-6 LM iteration each KF
  • original image resolution
    ==============================================
    PHOTOMETRIC MODE WITH CALIBRATION!
    got 2207 entries and 2207 files!
    Reading Calibration from file /home/hansrajpabbati/Desktop/DSO/Work/camera_2.txt ... found!
    Input resolution: 640 480
    In: 0.751875 1.000000 0.500000 0.500000 0.000000

Found fx=0.751875, fy=1.000000, cx=0.500000, cy=0.500000.
I'm assuming this is the "relative" calibration file format,and will rescale this by image width / height to fx=481.200000, fy=480.000000, cx=319.500000, cy=239.500000.

Out: No Rectification
Output resolution: 640 480

Rectified Kamera Matrix:
481.2 0 319.5
0 480 239.5
0 0 1

NO PHOTOMETRIC Calibration!
Reading Photometric Calibration from file
PhotometricUndistorter: Could not open file!
set timestamps and exposures to zero!
set EXPOSURES to zero!
got 2207 images and 0 timestamps and 0 exposures.!
ImageFolderReader: got 2207 files in /home/hansrajpabbati/Data_Odometry/dataset/sequences/01.zip!
using pyramid levels 0 to 3. coarsest resolution: 80 x 60!
ERROR: dont't have photometric calibation. Need to use commandline options mode=1 or mode=2 hansrajpabbati@hansrajpabbati-Inspiron-5537:~/Desktop/DSO/Work/Dso_Sparse/dso/build$

When running with mode=1 or mode=2 it gives segmentation fault (core dumped)

About real stereo camera usage

Hi, @jiatian,

Thanks for releasing such a desired package. If I want to test it on real stereo camera such as ZED stereo cam, could your package supports live camera input?

Thx!

About stereo rectifying image

Are you using opencv to rectify the stereo image?
The image size has change after rectify. Is it right to use the output P1 from cv2.stereoRectify as the intrinsic matrix?

KITTI error is higher than your reported numbers

Hi,

Thanks for making stereo DSO available.

I have evaluated KITTI benchmark (sequences 00 and 05) across 5 runs of stereo DSO (to account for randomness). The resulting errors are higher than what you report, especially the translational drift.
You report the following:
2.5% trans. error, 0.0045 deg/m rot. error on KITTI 00
2.7% trans. error, 0.0035 deg/m rot. error on KITTI 05.
I found the following:
3.6% trans. error, 0.0040 deg/m rot. error on KITTI 00
3.0% trans. error, 0.0043 deg/m rot. error on KITTI 05.

Could you please tell me if you have tuned any parameters to reach better KITTI results? For example, does your coupling factor correspond to the coupling factor of the original publication (which relates the static stereo matching energy to the frame-to-frame energy)?

I have attached my results of KITTI 00 and 05. The graphs that do not show the estimated trajectory correspond to the average across 5 runs.
I have also found that stereo DSO crashes when it loses track.

KITTI_00_kitti_plots_run_avg.pdf
KITTI_00_run0_kitti_plots.pdf
KITTI_05_kitti_plots_run_avg.pdf
KITTI_05_run0_kitti_plots.pdf

How to run stereo for real time

Hi all,
can you please tell me how can i run stereo for real time video, I have a single camera attached with machine and i'm accessing it using dso_ros, but what if i have two cameras or stereo camera, which commands will be used or guide me how can i do it if i have more than one cameras.

No keyframe poses dump

Hi, when I run stereo-dso on KITTI sequences, by line 559 fullSystem->printResult("result.txt");in ../src/main_dso_pangolin.cpp it should dump a file of all keyframe poses like DSO does? But instead nothing got dumped, can you help share some light on this?

Thank you!

Vertical Stereo DSO

Hello,

I have been using Stereo-DSO for stereo SLAM on fisheye cameras obtaining good results. Now I am trying stereo SLAM on pinhole camera models in vertical mode (top and bottom camera configuration), I am obtaining some issues during the initialization, does Stereo-DSO support vertical configuration (vertical baseline)?

Best,

results file

Hello,Would you please give your results files on euroc or kitti datasets?I am really need them,thank you very much!

evaluation

How did you get RPE? Is it possible to share or give the link to the code you used for evaluation?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.