tum-vision / ldso Goto Github PK
View Code? Open in Web Editor NEWDSO with SIM(3) pose graph optimization and loop closure
License: GNU General Public License v3.0
DSO with SIM(3) pose graph optimization and loop closure
License: GNU General Public License v3.0
I tried running LDSO on the TUM mono dataset and it always crashes after running fine for a few seconds with an OpenCV exception:
$ ./bin/run_dso_tum_mono preset=0 files=$datasets/TUM_mono/sequence_17/images.zip vignette=$datasets/TUM_mono/sequence_17/vignette.png calib=$datasets/TUM_mono/sequence_17/camera.txt gamma=$datasets/TUM_mono/sequence_17/pcalib.txt
[...]
I0410 20:17:17.630569 1714 FullSystem.cc:73] *** taking frame 298 ***
I0410 20:17:17.632458 1714 FullSystem.cc:114] tracking new frame
I0410 20:17:17.633743 1714 FullSystem.cc:378] Coarse Tracker tracked ab = -0.0404759 5.55444 (exp 1.65839 ). Res 3.22383
I0410 20:17:17.634377 1714 FullSystem.cc:153] deliver frame 298
I0410 20:17:17.634389 1714 FullSystem.cc:417] frame 298 is marked as key frame, active keyframes: 7
I0410 20:17:17.635699 1714 FullSystem.cc:715] frame 92 is set as marged
I0410 20:17:17.637185 1714 FullSystem.cc:440] adding new residuals
I0410 20:17:17.643625 1714 FullSystem.cc:473] call optimize on kf 95
I0410 20:17:17.646617 1714 FullSystem.cc:753] active residuals: 11354
I0410 20:17:17.649722 1714 FullSystem.cc:1799] A(2031730.573276)=(AV 4.997). Num: A(10170) + M(173269); ab -0.040476 5.554440!
I0410 20:17:17.658056 1714 FullSystem.cc:1799] A(2016907.831551)=(AV 4.787). Num: A(11001) + M(173269); ab -0.000028 2.549750!
I0410 20:17:17.666213 1714 FullSystem.cc:1799] A(2001263.132863)=(AV 4.776). Num: A(10966) + M(173269); ab -0.000028 2.401621!
I0410 20:17:17.675063 1714 FullSystem.cc:1799] A(2004354.887900)=(AV 4.777). Num: A(10977) + M(173269); ab -0.000027 2.393988!
I0410 20:17:17.682978 1714 FullSystem.cc:1799] A(1996609.719454)=(AV 4.771). Num: A(10963) + M(173269); ab -0.000027 2.384946!
I0410 20:17:17.692178 1714 FullSystem.cc:1799] A(2001787.426194)=(AV 4.774). Num: A(10980) + M(173269); ab -0.000027 2.392377!
I0410 20:17:17.700312 1714 FullSystem.cc:1799] A(1997903.293624)=(AV 4.772). Num: A(10967) + M(173269); ab -0.000027 2.385121!
I0410 20:17:17.706338 1714 FullSystem.cc:475] optimize is done!
I0410 20:17:17.706753 1714 FullSystem.cc:1412] remove outliers done, outliers: 1
I0410 20:17:17.714408 1714 FullSystem.cc:1262] Flag: nores: 0, oob: 401, marged: 390
I0410 20:17:17.719180 1714 FullSystem.cc:1268] using LDSO point selection strategy
I0410 20:17:17.722360 1714 FullSystem.cc:1276] new features features created: 548
I0410 20:17:17.722923 1714 FullSystem.cc:574] marg frame 289
I0410 20:17:17.725188 1714 FullSystem.cc:586] make keyframe done
I0410 20:17:17.725198 1714 FullSystem.cc:155] add active frame returned
I0410 20:17:17.730499 1713 LoopClosing.cc:125] candidate kf id: 45, max id: 94, min id: 74
I0410 20:17:17.730542 1713 LoopClosing.cc:133] add loop candidate from 45, current: 95, score: 0.0589082
I0410 20:17:17.730669 1713 LoopClosing.cc:166] matches: 14
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.5) /home/samuel/libraries/opencv-3.4.5/modules/calib3d/src/ptsetreg.cpp:167: error: (-215:Assertion failed) confidence > 0 && confidence < 1 in function 'run'
Backtrace:
#1 0x00007ffff034d801 in __GI_abort () at abort.c:79
#2 0x00007ffff0d408b7 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff0d46a06 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff0d46a41 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff0d46c74 in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff1adcd7a in cv::error(cv::Exception const&) () at /usr/local/lib/libopencv_core.so.3.4
#7 0x00007ffff1ae194f in cv::error(int, cv::String const&, char const*, char const*, int) () at /usr/local/lib/libopencv_core.so.3.4
#8 0x00007ffff6de5909 in _ZN2cvL13errorNoReturnEiRKNS_6StringEPKcS4_i () at /usr/local/lib/libopencv_calib3d.so.3.4
#9 0x00007ffff6ded845 in cv::RANSACPointSetRegistrator::run(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&) const () at /usr/local/lib/libopencv_calib3d.so.3.4
#10 0x00007ffff6e0a701 in cv::solvePnPRansac(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, bool, int, float, double, cv::_OutputArray const&, int) () at /usr/local/lib/libopencv_calib3d.so.3.4
#11 0x00005555555f0f36 in ldso::LoopClosing::CorrectLoop(std::shared_ptr<ldso::internal::CalibHessian>) ()
#12 0x00005555555f21cb in ldso::LoopClosing::Run() ()
#13 0x00007ffff0d7157f in () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#14 0x00007ffff10446db in start_thread (arg=0x7fffc3bd2700) at pthread_create.c:463
#15 0x00007ffff042e88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
I'm using OpenCV 3.4.5 installed from source.
Ignoring the exception with a throw-catch around the call to solvePnPRansac()
prevents any crashes but loop closure doesn't seem to work then, at least on dataset 17.
Dear author, think your program, i find some issue when i run make_project.sh, it display some error about opencv complier, please you help me cope with the problem then i can use the project achieve my research.
Scanning dependencies of target run_dso_tum_mono
[ 84%] Building CXX object examples/CMakeFiles/run_dso_tum_mono.dir/run_dso_tum_mono.cc.o
[ 87%] Linking CXX executable ../../bin/run_dso_tum_mono
../../lib/libldso.a(ImageRW_OpenCV.cc.o):在函数‘ldso::IOWrap::readStreamBW_8U(char*, int)’中:
ImageRW_OpenCV.cc:(.text+0x7d2):对‘cv::Mat::updateContinuityFlag()’未定义的引用
../../lib/libldso.a(ImageRW_OpenCV.cc.o):在函数‘ldso::IOWrap::writeImage(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, ldso::MinimalImage)’中:
ImageRW_OpenCV.cc:(.text+0xc0a):对‘cv::Mat::updateContinuityFlag()’未定义的引用
../../lib/libldso.a(ImageRW_OpenCV.cc.o):在函数‘ldso::IOWrap::writeImage(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, ldso::MinimalImage<Eigen::Matrix<unsigned char, 3, 1, 0, 3, 1> >)’中:
ImageRW_OpenCV.cc:(.text+0xf58):对‘cv::Mat::updateContinuityFlag()’未定义的引用
../../lib/libldso.a(ImageRW_OpenCV.cc.o):在函数‘ldso::IOWrap::writeImage(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, ldso::MinimalImage)’中:
ImageRW_OpenCV.cc:(.text+0x129e):对‘cv::Mat::updateContinuityFlag()’未定义的引用
../../lib/libldso.a(ImageRW_OpenCV.cc.o):在函数‘ldso::IOWrap::writeImage(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, ldso::MinimalImage<Eigen::Matrix<float, 3, 1, 0, 3, 1> >)’中:
ImageRW_OpenCV.cc:(.text+0x15e0):对‘cv::Mat::updateContinuityFlag()’未定义的引用
collect2: error: ld returned 1 exit status
examples/CMakeFiles/run_dso_tum_mono.dir/build.make:161: recipe for target '../bin/run_dso_tum_mono' failed
make[2]: *** [../bin/run_dso_tum_mono] Error 1
CMakeFiles/Makefile2:144: recipe for target 'examples/CMakeFiles/run_dso_tum_mono.dir/all' failed
make[1]: *** [examples/CMakeFiles/run_dso_tum_mono.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Thank you for your remarkable work.
I just have a question:
I noticed LDSO detect corners by shi-tomasi.
I just wondering why don't you use ORB features like orb-slam2?
Because when calculating the descriptor, LDSO also use the ORB descriptors.
Thank you so much for your reply!
Hi, I run the code and the input is right and can see the point cloud on Pangolin.
But when the program is finished, it will produce the system error:
I1204 11:44:46.282876 30182 run_dso_tum_mono.cc:674] EXIT NOW!
terminate called after throwing an instance of 'std::system_error'
what(): Invalid argument
./run_indoor_huaweo.sh: line 8: 30182 Aborted (core dumped) ./bin/run_dso_tum_mono files=./images calib=./camera.tx
t mode=2 preset=0 nogui=1 start=1000 end=1100
You can see the program is run to the last line of code "EXIT NOW", but there is one system error throwing. I think this may be the error call the FullSystem destructor, can you give me some advice on it?
LDSO/src/frontend/DSOViewer.cc
Line 336 in ae401bb
This line cause the program to crash
the mainthread is already in use
you need to change it to 👍
if (runThread.is_callable()) runThread.join()
Hi,
I tried to compile LDSO on my Ubuntu 16.04 with opencv 3.3.1, following the readme page. However, I happen to get the following error related to opencv.
It seems opencv 3.3.1 is quite outdated for this undefined reference to cv::Mat::updateContinuityFlag()
Does anybody know how to fix this problem?
Cheers
Hello everyone,
I need to load a map from a .bin file. I have found the "loadAll" function in FullSystem and have a few questions about it :
Is this function fully functional or is it just a basis for those who need to load information from a .bin file ?
And in which way am I supposed to use it ? I tried to add it in the "run_dso_kitti.cc" just before the main for loop but it crashes at the execution. More precisely, it crashes when the addActiveFrame function is called, and even more precisely in the setPrecalcFunction function, when trying to resize the targetPrecalc vector.
Thx a lot !
I have asked the same question in DSO issue #212
LDSO/src/frontend/CoarseInitializer.cc
Lines 340 to 352 in 1c1e3c9
why note update EAlpha
and use EAlpha.A
to calculate AlphaEnergy
?
Hello, I want to learn how to run this great demo realtimely by ros. Is there some exemple for it ? looking forward to your answer. Thanks!
I'm making an attempt at creating a Dockerfile to run this repo in, and I'm having some issues and I was wondering if anybody might have a useful input to it?
NOTE: The dockerfile is messy right now, I usually clean up afterwards ;)
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y libgoogle-glog-dev libgtest-dev libsuitesparse-dev libopencv-dev libzip-dev libboost-all-dev cmake git freeglut3-dev libglew-dev wget
RUN git clone https://github.com/stevenlovegrove/Pangolin.git
WORKDIR /Pangolin
RUN mkdir build
WORKDIR /Pangolin/build
RUN cmake ..
RUN cmake --build .
RUN mkdir /usr/include/eigen3
WORKDIR /usr/include/eigen3
RUN wget http://bitbucket.org/eigen/eigen/get/3.3.5.tar.bz2
RUN tar -C . -xjf 3.3.5.tar.bz2
RUN mv eigen-eigen-b3f3d4950030/* .
RUN rm -r eigen-eigen-b3f3d4950030
RUN rm 3.3.5.tar.bz2
WORKDIR /
RUN mkdir /repo
WORKDIR /repo
COPY . .
RUN sed -i 's/\r//' make_project.sh
RUN ./make_project.sh
When I build with docker build --rm -f ".Dockerfile" -t ldso:latest .
I get the following output
...
[ 42%] Building CXX object src/CMakeFiles/ldso.dir/internal/OptimizationBackend/AccumulatedSCHessian.cc.o
[ 45%] Building CXX object src/CMakeFiles/ldso.dir/internal/OptimizationBackend/AccumulatedTopHessian.cc.o
[ 51%] Building CXX object src/CMakeFiles/ldso.dir/frontend/CoarseTracker.cc.o
[ 51%] Building CXX object src/CMakeFiles/ldso.dir/internal/OptimizationBackend/EnergyFunctional.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
src/CMakeFiles/ldso.dir/build.make:182: recipe for target 'src/CMakeFiles/ldso.dir/Map.cc.o' failed
make[2]: *** [src/CMakeFiles/ldso.dir/Map.cc.o] Error 4
make[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
make[2]: *** [src/CMakeFiles/ldso.dir/internal/PR.cc.o] Error 4
src/CMakeFiles/ldso.dir/build.make:350: recipe for target 'src/CMakeFiles/ldso.dir/internal/PR.cc.o' failed
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/ldso.dir/all' failed
make[1]: *** [src/CMakeFiles/ldso.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/sh -c ./make_project.sh' returned a non-zero code: 2
I tried some fixes from the closed issues, like updating Eigen (Which you can see in the Dockerfile) but it didn't seem to change anything.
When I run
run_dso_kitti
preset=0
files=../../../02_datasets/KITTI/dataset/sequences/00/
calib=./examples/Kitti/Kitti00-02.txt
I found an error in function
void Undistort::readFromFile(const char *configFileName, int nPars, std::string prefix)
in Undistort.cc.
if (l3 == "crop") {
outputCalibration[0] = -1;
printf("Out: Rectify Crop\n");
} else if (l3 == "full") {
l3 == "crop" return is 0.
I compile the code in Ubuntu 16.04.
needNewKFAfter not update?, if not linearizeOperation must update, dso:
if(needKF) needNewKFAfter=fh->shell->trackingRef->id;
Would you like to wrap any pointer data members with the class template “std::unique_ptr”?
Hello, thank you for clarify DSO code!
I'd like to use 6dof information from other sensor to make nice Point cloud with DSO.
Could you give me the suggestion?
Related issues with DSO is as follows:
JakobEngel/dso#165
Sho
[ 81%] Built target ldso
[ 84%] Linking CXX executable ../../bin/run_dso_euroc
[ 87%] Linking CXX executable ../../bin/run_dso_kitti
[ 90%] Linking CXX executable ../../bin/run_dso_tum_mono
/usr/bin/ld: cannot find -lwayland-egl
/usr/bin/ld: cannot find -lEGL
collect2: error: ld returned 1 exit status
examples/CMakeFiles/run_dso_euroc.dir/build.make:173: recipe for target '../bin/run_dso_euroc' failed
make[2]: *** [../bin/run_dso_euroc] Error 1
CMakeFiles/Makefile2:181: recipe for target 'examples/CMakeFiles/run_dso_euroc.dir/all' failed
make[1]: *** [examples/CMakeFiles/run_dso_euroc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lwayland-egl
/usr/bin/ld: cannot find -lEGL
collect2: error: ld returned 1 exit status
examples/CMakeFiles/run_dso_tum_mono.dir/build.make:173: recipe for target '../bin/run_dso_tum_mono' failed
make[2]: *** [../bin/run_dso_tum_mono] Error 1
CMakeFiles/Makefile2:144: recipe for target 'examples/CMakeFiles/run_dso_tum_mono.dir/all' failed
make[1]: *** [examples/CMakeFiles/run_dso_tum_mono.dir/all] Error 2
/usr/bin/ld: cannot find -lwayland-egl
/usr/bin/ld: cannot find -lEGL
collect2: error: ld returned 1 exit status
examples/CMakeFiles/run_dso_kitti.dir/build.make:173: recipe for target '../bin/run_dso_kitti' failed
make[2]: *** [../bin/run_dso_kitti] Error 1
CMakeFiles/Makefile2:218: recipe for target 'examples/CMakeFiles/run_dso_kitti.dir/all' failed
make[1]: *** [examples/CMakeFiles/run_dso_kitti.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Hi,
I am trying to implement LDSO as a ROS package and am having some problems in readying the files to compile it. I am quite new to both SLAM and ROS and wanted to know if anyone has already succeeded in implementing the same?
I have taken a look at issue #20 but am still struggling
The FeatureDetector class is not considering the HALF_PATCH_SIZE border of ORB. Thus, I am experiencing segfaults in corners detected in the image borders.
Thanks for the impressive work! I've met one problem by using my own sequence. The memeory usage grows rapidly and then my laptop died. The memory of my laptop is 8GB, which is not too small. I've tried the TUM-Mono dataset sequence 34. The LDSO works very good and the maximal memory usage is about 1,7GB. Can anybody help me with this problem? Anything wrong with my own sequence? Note: I have no global shutter camera, so I made my own sequence with GoPro.
Hi all,
I'm testing the system using Euroc and TUMMono dataset and I experience that the system is painfully SLOW. I wonder if I am the only one experiencing it. I do not get more than 0.3 fps using preset 0, and 3 fps with preset 5.
Hello,Would you please give your results files on euroc or kitti datasets contain no loop-closure and loop-closure?Or maybe you don't have all files,but if you have some files,thats ok. I am really need them,thank you very much!
Hello, after reading the codes, I found out that every keyframe has a TcwOpti
for saving the pose before and after pose graph optimization. What confuses me is that you initializes TcwOpti
here, before sliding window optimization. Wouldn't it be better if you initialize it after sliding window optimization, then update it after pose graph optimization when detecting loops?
On macosx build fails due to std::map allocator issue with const. Also, if I understand it correctly, it seems like an incorrect allocator is provided in Frame.h, leading to potential memory corruption.
The following patch should help fix map const allocator.
Hi, recently I am evaluating ldso on kitti_dataset , one problem is the stamps of dso result file are not in order (not ascending, always 0.1~0.9 ) , so I can not compare it with kitti_ground_truth whose stamps are ascending . And I print id instead of stamps just like ldso did now.
I saw ldso has been evaluated on kitti_dataset , so I wonder how to do it, please help me to solve it if it is possible. Thanks a lot!
Hi, I already build the project successfully and got the execution program, but when I ran ./bin/run_dso_kitti, I got segment fault problem. I use data sets from Kiiti odometry,
I want to know when the program will get Segment Fault situation and how do I address this issue.
Thank you,
Like below:
PHOTOMETRIC MODE WITHOUT CALIBRATION!
Reading Calibration from file /home/yuu/Downloads/kitti_odometry/dataset/sequences/02/camera.txt ... found!
found PINHOLE camera model, building rectifier.
Input resolution: 1241 367
In: 718.856000 718.856000 607.192800 185.215700 0.000000
Out: No Rectification
Output resolution: 1241 367
Rectified Kamera Matrix:
718.856 0 607.193
0 718.856 185.216
0 0 1
NO PHOTOMETRIC Calibration!
Reading Photometric Calibration from file
PhotometricUndistorter: Could not open file!
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1024 15:18:09.670336 5237 DatasetReader.h:286] Loading Kitti timestamps!
I1024 15:18:09.670459 5237 DatasetReader.h:292] cannot find timestamp file at /home/yuu/Downloads/kitti_odometry/dataset/sequences/02/image_0/times.txt
using pyramid levels 0 to 0. coarsest resolution: 1241 x 367!
===============WARNING!===================
I need higher resolution.
I will probably segfault.
I1024 15:18:10.360255 5237 FullSystem.cc:34] This is Direct Sparse Odometry, a fully direct VO proposed by TUM vision group.For more information about dso, see Direct Sparse Odometry, J. Engel, V. Koltun, D. Cremers, In arXiv
:1607.02565, 2016. For loop closing part, see LDSO: Direct Sparse Odometry with Loop Closure, X. Gao, R. Wang, N. Demmel, D. Cremers, In International Conference on Intelligent Robots and Systems (IROS), 2018
I1024 15:18:10.483799 5237 FullSystem.cc:51] Use fast loop closing
I1024 15:18:10.484431 5247 LoopClosing.h:67] wait loop closing to join
I1024 15:18:10.488888 5246 LoopClosing.cc:44] find loop closing thread need finish flag!
I1024 15:18:10.488950 5247 LoopClosing.h:82] Loop closing thread is finished
I1024 15:18:10.488962 5247 FullSystem.cc:1935] saving kitti trajectory...
I1024 15:18:10.489017 5247 FullSystem.cc:1963] done.
I1024 15:18:10.489032 5247 FullSystem.cc:1935] saving kitti trajectory...
I1024 15:18:10.489048 5247 FullSystem.cc:1963] done.
Segmentation fault (core dumped)
The log looks like:
...
I0417 02:07:15.490262 66300 FullSystem.cc:574] marg frame 167
I0417 02:07:15.494781 66300 FullSystem.cc:586] make keyframe done
I0417 02:07:15.494812 66300 FullSystem.cc:155] add active frame returned
I0417 02:07:15.497190 66299 LoopClosing.cc:125] candidate kf id: 6, max id: 17, min id: 7
I0417 02:07:15.497284 66299 LoopClosing.cc:140] add loop candidate from 6, current: 18, score: 0.0696457
I0417 02:07:15.497807 66299 LoopClosing.cc:166] matches: 30
OpenCV Error: Assertion failed (confidence > 0 && confidence < 1) in run, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/calib3d/src/ptsetreg.cpp, line 178
I0417 02:07:15.498713 66300 FullSystem.cc:73] *** taking frame 178 ***
I0417 02:07:15.500759 66300 FullSystem.cc:107] swap coarse tracker to 177
I0417 02:07:15.500782 66300 FullSystem.cc:114] tracking new frame
I0417 02:07:15.502157 66300 FullSystem.cc:378] Coarse Tracker tracked ab = -0.0482893 4.53887 (exp 1 ). Res 2.57252
I0417 02:07:15.502806 66300 FullSystem.cc:153] deliver frame 178
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/calib3d/src/ptsetreg.cpp:178: error: (-215) confidence > 0 && confidence < 1 in function run
[1] 66291 abort (core dumped) ./bin/run_dso_euroc preset=0
Does anyone knows how to solve this? I think V2_03 dataset is kind of challenging and i want to know whether this core dumped is caused by the difficulty of the dataset, or it is a coding issue?
Thank you very much.
The Oxford RR dataset was captured with a global shutter camera - and is in the kitti dataset.
Without resetting at about 1000 frame mark, it never initializes. When it does initialize, it loses track at random intervals (even when the car is moving forward without rotation at a constant velocity) - and requires resetting again.
What could explain this behaviour? Is there anything peculiar about this dataset that sets it apart from KITTI. Both don't have photometric calibration and are recorded with a global shutter camera.
I run LDSO on the rectified, undistorted images from the stereo/centre bumbebee camera and use the following calibration:
Pinhole 964.828979 964.828979 643.788025 484.407990 0
1280 960
crop
1280 960
Here's the radar robotcar dataset: https://dbarnes.github.io/radar-robotcar-dataset/datasets
Fresh install of 18.10 Cosmic Cuttlefish, I followed the documentation steps but make_project.sh fails on the first dependency with this error:
[ 3%] Building CXX object src/CMakeFiles/ldso.dir/Frame.cc.o
cc1plus: warning: command line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
In file included from /usr/include/c++/8/map:61,
from /usr/include/eigen3/Eigen/SparseCore:16,
from /usr/include/eigen3/Eigen/Sparse:26,
from /usr/include/eigen3/Eigen/Eigen:2,
from /home/osboxes/LDSO/thirdparty/sophus/sophus.hpp:36,
from /home/osboxes/LDSO/thirdparty/sophus/so3.hpp:27,
from /home/osboxes/LDSO/thirdparty/sophus/se3.hpp:27,
from /home/osboxes/LDSO/include/NumTypes.h:7,
from /home/osboxes/LDSO/include/Frame.h:12,
from /home/osboxes/LDSO/src/Frame.cc:1:
/usr/include/c++/8/bits/stl_map.h: In instantiation of ‘class std::map<std::shared_ptrldso::Frame, ldso::Frame::RELPOSE, std::less<std::shared_ptrldso::Frame >, Eigen::aligned_allocatorldso::Frame::RELPOSE >’:
/home/osboxes/LDSO/include/Frame.h:158:106: required from here
/usr/include/c++/8/bits/stl_map.h:122:21: error: static assertion failed: std::map must have the same value_type as its allocator
static_assert(is_same<typename _Alloc::value_type, value_type>::value,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/osboxes/LDSO/thirdparty/DBoW3/src/DBoW3.h:60,
from /home/osboxes/LDSO/include/NumTypes.h:16,
from /home/osboxes/LDSO/include/Frame.h:12,
from /home/osboxes/LDSO/src/Frame.cc:1:
/home/osboxes/LDSO/thirdparty/DBoW3/src/Database.h:31:12: warning: ‘DBoW3::MIN_COMMON_WORDS’ defined but not used [-Wunused-variable]
static int MIN_COMMON_WORDS = 5;
^~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/ldso.dir/build.make:76: src/CMakeFiles/ldso.dir/Frame.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: src/CMakeFiles/ldso.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
It looks similar to something that has recently been fixed in DSO? (JakobEngel/dso#111 ). Hopefully the solution will be obvious to someone who knows what they are doing :-)
I am getting this error;
I0921 12:00:08.084867 4784 FullSystem.cc:51] Use fast loop closing
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 140) > this->size() (which is 0)
Aborted (core dumped)
What kind of data set is uesd to build the BoW dictionary of LDSO?
Than you.
my git status: gurturk@gurturk:~/Downloads$ git status LDSO-master/ fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
When installing the software . i did not get any error.
this is my code;
./bin/run_dso_tum_mono preset=0 files=/home/gurturk/Downloads/sequence_17/images.zip vignette=/home/gurturk/Downloads/sequence_17/vignette.png calib=/home/gurturk/Downloads/sequence_17/camera.txt gamma=/home/gurturk/Downloads/sequence_17/pcalib.txt
i came across this result;
``I0502 15:50:15.658877 5582 LoopClosing.cc:125] candidate kf id: 41, max id: 96, min id: 75
I0502 15:50:15.658922 5582 LoopClosing.cc:133] add loop candidate from 41, current: 97, score: 0.046042
I0502 15:50:15.659015 5582 LoopClosing.cc:166] matches: 19
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.0.0) /home/gurturk/opencv/modules/calib3d/src/ptsetreg.cpp:167: error: (-215:Assertion failed) confidence > 0 && confidence < 1 in function 'run'`
Aborted (core dumped)
`
Thank you for opening your codes! I find you optimized the keyframes poses in loop closure. I wonder if I understand the following correctly:
Hello Dr. Gao,
Thank you for publishing this wondering project. When I was reading it, I found a small problem: in LoopClosing::ComputeOptimizedPose, line 272, you declare a vector of 2d vectors called activePixels; then in line 298, you iterate through activePixels and dilate the idepth around each activePixels. However, did you forget to put data into activePixels in the previous block (L276-L295) when projecting all points to the current frame?
Thank you!
Jiawei
Master branch, no changes made.
Compilation works.
Running with loopclosing=0 works.
OpenCV 4.1.2-dev
Running on TUM Sequence 21
Enabling loopclosing fails at random frames.
./bin/run_dso_tum_mono preset=0 files=../data/tum/sequences/21/images.zip vignette=../data/tum/sequences/21/vignette.png calib=../data/tum/sequences/21/camera.txt gamma=../data/tum/sequences/21/pcalib.txt nogui=1 loopclosing=1
...
...
I0124 16:02:59.402202 3446 FullSystem.cc:1283] new features features created: 1009
I0124 16:02:59.402240 3446 FullSystem.cc:578] marg frame 81
I0124 16:02:59.407384 3446 FullSystem.cc:590] make keyframe done
I0124 16:02:59.407413 3446 FullSystem.cc:155] add active frame returned
I0124 16:02:59.413882 3445 LoopClosing.cc:125] candidate kf id: 3, max id: 42, min id: 25
I0124 16:02:59.413908 3445 LoopClosing.cc:140] add loop candidate from 3, current: 43, score: 0.0917464
I0124 16:02:59.414050 3445 LoopClosing.cc:166] matches: 21
I0124 16:02:59.418810 3446 FullSystem.cc:73] *** taking frame 133 ***
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.1.2-dev) /path/opencv/modules/calib3d/src/calibration.cpp:1171: error: (-2:Unspecified error) in function 'void cvFindExtrinsicCameraParams2(const CvMat*, const CvMat*, const CvMat*, const CvMat*, CvMat*, CvMat*, int)'
> DLT algorithm needs at least 6 points for pose estimation from 3D-2D point correspondences. (expected: 'count >= 6'), where
> 'count' is 5
> must be greater than or equal to
> '6' is 6
Aborted (core dumped)
The error happens on different frames. With luck it sometimes finishes with no errors, but there is something definitely wrong somewhere. Maybe some race condition?
Any suggestions?
Edit: Same issue appears on other datasets as well (Kitti, EuRoC).
Thank you for the excellent work!
There seems to be a compile error, here is the log:
[ 18%] Building CXX object src/CMakeFiles/ldso.dir/Map.cc.o
In file included from /usr/include/eigen3/Eigen/StdVector:23:0,
from /Works/LDSO/thirdparty/g2o/g2o/core/jacobian_workspace.h:31,
from /Works/LDSO/thirdparty/g2o/g2o/core/optimizable_graph.h:41,
from /Works/LDSO/thirdparty/g2o/g2o/core/base_vertex.h:30,
from /Works/LDSO/include/internal/PR.h:8,
from /Works/LDSO/src/Map.cc:8:
/usr/include/eigen3/Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of ‘std::vector<T, Eigen::aligned_allocator >’ after instantiation of ‘std::vector<ldso::internal::FrameFramePrecalc, Eigen::aligned_allocatorldso::internal::FrameFramePrecalc >’ [-fpermissive]
class vector<T,EIGEN_ALIGNED_ALLOCATOR >
^
Hi @NikolausDemmel , I want to have a try to estimate this repo, but what confused me is I don't know how to save and extract the trajectory generated finally as a file to compare with groundth by other tools. Is there any corresponding code for saving and extracting trajectory? Could you give me some suggestions? Thank you very much !
LDSO loop closing and ORB_SLAM2 loop closing different. LDSO loop closing some time ORB_SLAM2 loop closing is best,LDSO loop closing is BAD.
Hi, Thank you for this impressive work. I tried to use this on my own sequence. But I found it cannot be closed after a full loop. I don't whats happening. Could anyone help me?
I run
./bin/run_dso_tum_mono preset=0 setting_enableLoopClosing=true setting_pointSelection=1 files=/media/gone/Elements/TO_DSO/calibratedRADIO/images/ vignette=/home/gone/calib/radio/vignette.png calib=/home/gone/calib/radio/camera.txt gamma=/home/gone/calib/radio/pcalib.txt
in command.
No error happens but the result is just like below:
The command window just show this:
Is there anything I missed?
publishCamPose funtion frame->features size == 0 ? Always 0
Hi,I see your project is inspired by dso and I run your project successfully.Did you try stereo-dso?If you have tried it on euroc dataset successfully,could you please help me solve few issues?Thank you!
Hello,could you please tell me which tool you use to evaluate the project?thank you!
Hi, authors,
I know that the estimated poses for each keyframe are saved as result.txt
. However, how could I save the estimated poses for each frame? Is that portion of code written inside LDSO? If not, could you give some hints on how to modify the original code for getting the estimated poses for each frame?
THX!
Hello and thanks for publishing such an amazing code.
I would like to use the 3D points generated by LDSO in a mesh reconstruction research. For that purpose, I would like to know all 3D points which are visible from a specific KF. I know LDSO is a direct method, so is it possible for LDSO to export that visibility information? If yes, where, in the code, can I look for such information?
Thanks @NikolausDemmel
Hi, I compiled the algorithm on TUM datasets.
I've got some good results and I want to extract the point cloud from LDSO for using it in a visualizer(such as meshlab).
I have got a method in DSO: JakobEngel/dso#55
But when I try to do it in LDSO, I found the code changes a lot.
Has anyone success to extract the point cloud by LDSO? Can you help us? I think it will be helpful for many people!
I am running a 1920*1080 image sequence captured by myself. The path are configured correctly, and the algorithm successfully initialized and ran for a while, but stopped in the middle showing a "Segmentation fault (core dumped)" error.
By adding more print outs I locate that the error occurs in the following for loop at the end of function FeatureDetector::DetectCorners in FeatureDetector.cc:
for (auto &feat: frame->features) {
if (feat->isCorner) {
feat->angle = IC_Angle(
frame->frameHessian->dIp[feat->level], Vec2f(feat->uv[0], feat->uv[1]), feat->level);
ComputeDescriptor(frame, feat);
cntCornerSelected++;
}
}
Any clues on the possible cause of the problem? Any help is appreciated!
The calibration file I used is as following:
RadTan 2295.199 2334.593 912.909 473.102 -0.638358 0.320621 0.00050989 0.010952
1920 1080
crop
1792 1024
Originally I used "1920 1080" for the last line, but there is a warning saying pyramid level may be too few. The "1792 1024" result in 5 pyramid levels and the warning is gone. Both settings of the last line meet the same segmentation fault.
When I run GDB, it shows the following:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000048f473 in ldso::FeatureDetector::DetectCorners(int, std::shared_ptr<ldso::Frame>&) ()
[Current thread is 1 (Thread 0x7fbab5e9f700 (LWP 23654))]
(gdb) where
#0 0x000000000048f473 in ldso::FeatureDetector::DetectCorners(int, std::shared_ptr<ldso::Frame>&) ()
#1 0x0000000000464a1e in ldso::FullSystem::makeNewTraces(std::shared_ptr<ldso::internal::FrameHessian>, float*) ()
#2 0x0000000000470e63 in ldso::FullSystem::makeKeyFrame(std::shared_ptr<ldso::internal::FrameHessian>) ()
#3 0x0000000000472a1c in ldso::FullSystem::deliverTrackedFrame(std::shared_ptr<ldso::internal::FrameHessian>, bool) ()
#4 0x00000000004731b5 in ldso::FullSystem::addActiveFrame(ldso::ImageAndExposure*, int) ()
#5 0x000000000045434f in main::{lambda()#1}::operator()() const [clone .constprop.303] ()
#6 0x00007fbadc8a6c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007fbadcb776ba in start_thread (arg=0x7fbab5e9f700)
at pthread_create.c:333
#8 0x00007fbadc00c41d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
opencv 4 has modified their calib3d/calibration.cpp which will result the following exception:
I0130 19:00:57.922091 32521 FullSystem.cc:73] *** taking frame 1900 ***
I0130 19:00:57.922495 32520 LoopClosing.cc:125] candidate kf id: 1410, max id: 1537, min id: 1525
I0130 19:00:57.922719 32520 LoopClosing.cc:133] add loop candidate from 1410, current: 1538, score: 0.0417803
I0130 19:00:57.923154 32520 LoopClosing.cc:166] matches: 19
I0130 19:00:57.926975 32521 FullSystem.cc:107] swap coarse tracker to 1899
I0130 19:00:57.926997 32521 FullSystem.cc:114] tracking new frame
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.9-dev) /home/ran/Programs/opencv/modules/calib3d/src/calibration.cpp:1099: error: (-2:Unspecified error) in function 'void cvFindExtrinsicCameraParams2(const CvMat*, const CvMat*, const CvMat*, const CvMat*, CvMat*, CvMat*, int)'
> DLT algorithm needs at least 6 points for pose estimation from 3D-2D point correspondences. (expected: 'count >= 6'), where
> 'count' is 5
> must be greater than or equal to
> '6' is 6
Hi,
Im trying to compile the LDSO Package with ROS.
When I include <ros/ros.h> in DSOViewer.h I get an avalanche of errors such as;
"Reference to _1 is ambiguous". These errors occur in ros/nodehandle.h and FullSystem.cc
This seems like a namespace conflict between ROS, std and Boost.
I'm not sure how to resolve it, can anyone help me?
cmake_minimum_required(VERSION 2.8)
project(ldso)
# Set default build type if not specified otherwise.
# See https://cmake.org/pipermail/cmake/2012-May/050243.html
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
message(STATUS "Setting build type to '${CMAKE_BUILD_TYPE}' as none was specified.")
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
# C++ standard
if(${CMAKE_VERSION} VERSION_LESS "3.2.0")
set( CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}" )
else()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
# costum modules
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# TODO: change this to not output outside build dir
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# required libs
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
)
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
if(OpenCV_VERSION VERSION_LESS 3)
add_definitions(-DLDSO_OPENCV2)
endif()
find_package(Glog REQUIRED)
find_package(Pangolin REQUIRED)
# optional libs
find_package(LibZip QUIET)
set(CMAKE_CXX_FLAGS "-Wall -Wno-deprecated -march=native -Wno-duplicate-decl-specifier -Wno-ignored-qualifiers -Wno-reorder -Wno-missing-braces")
if(NOT APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()
# decide if we have ziplib.
if (LIBZIP_LIBRARY)
message("--- found ziplib (${LIBZIP_VERSION}), compiling with zip capability.")
add_definitions(-DHAS_ZIPLIB=1)
include_directories( ${LIBZIP_INCLUDE_DIR_ZIP} ${LIBZIP_INCLUDE_DIR_ZIPCONF} )
else()
message("--- not found ziplib (${LIBZIP_LIBRARY}), compiling without zip capability.")
set(LIBZIP_LIBRARY "")
endif()
include_directories(
${EIGEN3_INCLUDE_DIR}
${OpenCV_INCLUDE_DIR}
${Glog_INCLUDE_DIRS}
${Pangolin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/thirdparty/
${PROJECT_SOURCE_DIR}/thirdparty/g2o/
${PROJECT_SOURCE_DIR}/thirdparty/DBoW3/
)
set( THIRD_PARTY_LIBS
${OpenCV_LIBS}
${GLOG_LIBRARY}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o${CMAKE_SHARED_LIBRARY_SUFFIX}
${PROJECT_SOURCE_DIR}/thirdparty/DBoW3/build/src/libDBoW3${CMAKE_SHARED_LIBRARY_SUFFIX}
${LIBZIP_LIBRARY}
)
add_subdirectory(src)
add_subdirectory(examples)
Hi, I have saved all the point cloud and I found some of point clouds are too far away from real position, do you have some recommendations to solve the point cloud inverse depth not accurate problem ?
Best
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.