Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SLAM module #317

Closed
wants to merge 25 commits into from
Closed

Add SLAM module #317

wants to merge 25 commits into from

Conversation

paulinus
Copy link
Member

This PR adds a SLAM module to OpenDroneMap so that it is possible to use videos as input instead of still images. It uses the open-source library ORB_SLAM2 to compute the camera trajectory and then continues with PMVS and the rest of the pipeline.

Building the SLAM module is set as an option in the CMake files and the default is not to build it.

Here's a short guide on how to use it

@dakotabenjamin
Copy link
Member

While building SLAM dependencies, I ran into this error while installing pangolin:

[ 64%] Performing configure step for 'pangolin'
Build type not set (defaults to release)
-DCMAKE_BUILD_TYPE=Debug for debug
CMake Error at CMakeModules/FindGLEW.cmake:51 (MESSAGE):
  Could not find GLEW
Call Stack (most recent call first):
  src/CMakeLists.txt:131 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/dmb2/OpenDroneMap/SuperBuild/build/pangolin/CMakeFiles/CMakeOutput.log".
make[2]: *** [pangolin/stamp/pangolin-configure] Error 1
make[1]: *** [CMakeFiles/pangolin.dir/all] Error 2
make: *** [all] Error 2

As a shot in the dark, I tried installing libglew1.10 and glew-utils to no avail.

@dakotabenjamin
Copy link
Member

Haven't forgotten about this, just working on acquiring test data

shakes fists at FAA

@Bavar2142
Copy link

Have any luck getting that test data? @dakotabenjamin

@dakotabenjamin
Copy link
Member

I would say 1-2 weeks, unless I can find another source of data with all the requisite metadata.

@smathermather
Copy link
Contributor

We can probably collect test data now... thanks to part 107.

@dakotabenjamin
Copy link
Member

dakotabenjamin commented Oct 5, 2016

So I manually installed glew and got pangolin to install after that.

Despite this, I am still having trouble installing:

dmb2@OpenDroneMap:~/opendronemap/build$ make
[ 15%] Built target odm_extract_utm
[ 42%] Built target odm_georef
[ 57%] Built target odm_meshing
[ 73%] Built target odm_orthophoto
[ 94%] Built target odm_texturing
Linking CXX executable ../../bin/odm_slam
/usr/bin/ld: cannot find -lpangolin
collect2: error: ld returned 1 exit status
make[2]: *** [bin/odm_slam] Error 1
make[1]: *** [modules/odm_slam/CMakeFiles/odm_slam.dir/all] Error 2
make: *** [all] Error 2
dmb2@OpenDroneMap:~/opendronemap/build$

@pierotofy
Copy link
Member

If you need test data, please let me know. I recently passed the FAA remote pilot test.

@dakotabenjamin
Copy link
Member

@paulinus when you get a chance can you re-point this to master? I want to delete the dev branch.

@pierotofy
Copy link
Member

I took this chessboard video: https://github.com/pierotofy/drone-video-datasets/releases/download/gulf-to-bay-blvd/chessboard_DJI_Phantom_3_Adv.MOV

There's a little glare from the window, but hopefully it works.

@mojodna
Copy link
Member

mojodna commented Nov 27, 2016

I also have some chessboard video from a Phantom 2 Vision+ if that's useful.

Screengrab:

image

Conflicts:
	configure.sh
	opendm/config.py
	opendm/types.py
	scripts/odm_app.py
@paulinus
Copy link
Member Author

@dakotabenjamin I've merged a recent dev commit into this branch to resolve conflicts. I've tested the result on a clean ubuntu 14.4 and it runs fine

@dakotabenjamin
Copy link
Member

Great! I will test this week.

@dakotabenjamin
Copy link
Member

dakotabenjamin commented Dec 20, 2016

Running on Ubuntu 16.04 while building SLAM dependencies

In file included from /usr/include/eigen3/Eigen/Core:297:0,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /usr/include/eigen3/Eigen/Eigen:1,
                 from /home/dmb2/opendronemap/SuperBuild/install/include/pangolin/gl/gl.h:40,
                 from /home/dmb2/opendronemap/SuperBuild/install/include/pangolin/pangolin.h:34,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/MapDrawer.h:27,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/Viewer.h:26,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/Tracking.h:28,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/LocalMapping.h:27,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/LoopClosing.h:25,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/include/Optimizer.h:27,
                 from /home/dmb2/opendronemap/SuperBuild/src/orb_slam2/src/Optimizer.cc:21:
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<int, -1, 1>; Src = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; Func = Eigen::internal::assign_op<int>]’:
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:712:27:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type) [with Dst = Eigen::Matrix<int, -1, 1>; Src = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; Func = Eigen::internal::assign_op<int>; typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing<Src>::value), void*>::type = void*]’
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:693:18:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<int, -1, 1>; Src = Eigen::Matrix<long int, -1, 1, 0, -1, 1>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:682:32:   required from ‘Derived& Eigen::PlainObjectBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; Derived = Eigen::Matrix<int, -1, 1>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:225:24:   required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Matrix<long int, -1, 1, 0, -1, 1>; _Scalar = int; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]’
/usr/include/eigen3/Eigen/src/Core/PermutationMatrix.h:367:17:   required from ‘Eigen::PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, IndexType>& Eigen::PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime, IndexType>::operator=(const Eigen::PermutationBase<OtherDerived>&) [with Other = Eigen::PermutationMatrix<-1, -1, long int>; int SizeAtCompileTime = -1; int MaxSizeAtCompileTime = -1; _StorageIndex = int]’
/home/dmb2/opendronemap/SuperBuild/src/orb_slam2/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h:68:18:   required from ‘void g2o::LinearSolverEigen<MatrixType>::CholeskyDecomposition::analyzePatternWithPermutation(g2o::LinearSolverEigen<MatrixType>::SparseMatrix&, const PermutationMatrix&) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>; g2o::LinearSolverEigen<MatrixType>::SparseMatrix = Eigen::SparseMatrix<double, 0>; g2o::LinearSolverEigen<MatrixType>::PermutationMatrix = Eigen::PermutationMatrix<-1, -1, long int>]’
/home/dmb2/opendronemap/SuperBuild/src/orb_slam2/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h:195:9:   required from ‘void g2o::LinearSolverEigen<MatrixType>::computeSymbolicDecomposition(const g2o::SparseBlockMatrix<MatrixType>&) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>]’
/home/dmb2/opendronemap/SuperBuild/src/orb_slam2/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h:100:37:   required from ‘bool g2o::LinearSolverEigen<MatrixType>::solve(const g2o::SparseBlockMatrix<MatrixType>&, double*, double*) [with MatrixType = Eigen::Matrix<double, 7, 7, 0, 7, 7>]’
/home/dmb2/opendronemap/SuperBuild/src/orb_slam2/src/Optimizer.cc:1244:1:   required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
     #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
                                        ^
/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h:707:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
   EIGEN_STATIC_ASSERT((internal::functor_is_product_like<BINOP>::ret \
   ^
/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:745:3: note: in expansion of macro ‘EIGEN_CHECK_BINARY_COMPATIBILIY’
   EIGEN_CHECK_BINARY_COMPATIBILIY(Func,typename ActualDstTypeCleaned::Scalar,ty
   ^
CMakeFiles/ORB_SLAM2.dir/build.make:350: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o' failed
make[5]: *** [CMakeFiles/ORB_SLAM2.dir/src/Optimizer.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ORB_SLAM2.dir/all' failed
make[4]: *** [CMakeFiles/ORB_SLAM2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/orb_slam2.dir/build.make:123: recipe for target 'orb_slam2/stamp/orb_slam2-build' failed
make[2]: *** [orb_slam2/stamp/orb_slam2-build] Error 2
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/orb_slam2.dir/all' failed
make[1]: *** [CMakeFiles/orb_slam2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@dakotabenjamin
Copy link
Member

dakotabenjamin commented Dec 22, 2016

OK so I couldn't get it to work in 16.04, but I did get it installed in 14.04 no problem. I got the camera calibration working, but when running python run.py --project-path /vagrant_data/video/bowl/ --video /vagrant_data/video/bowl/bowl.mp4 --slam-config /vagrant_data/video/bowl/config.yaml --resize-to 1600 I got the following error:

[INFO]    Running OMD Slam Cell
[DEBUG]   running cd /vagrant_data/video/bowl/opensfm && /home/vagrant/opendronemap/build/bin/odm_slam /home/vagrant/opendronemap/SuperBuild/src/orb_slam2/Vocabulary/ORBvoc.txt /vagrant_data/video/bowl/config.yaml /vagrant_data/video/bowl/bowl.mp4
[h264 @ 0x2359920] A non-intra slice in an IDR NAL unit.
[h264 @ 0x2359920] decode_slice_header error

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!


Camera Parameters:
- fx: 1896.14
- fy: 1891.92
- cx: 951.578
- cy: 412.095
- k1: -0.179766
- k2: 0.619702
- k3: -3.00211
- p1: -0.01502
- p2: -0.00244496
- fps: 24
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters:
- Number of Features: 4000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7
terminate called after throwing an instance of 'std::runtime_error'
  what():  Pangolin X11: Failed to open X display
Aborted (core dumped)
Traceback (most recent call last):
  File "/home/vagrant/opendronemap/run.py", line 50, in <module>
    plasm.execute(niter=1)
  File "/home/vagrant/opendronemap/scripts/odm_slam.py", line 61, in process
    video,
  File "/home/vagrant/opendronemap/opendm/system.py", line 28, in run
    raise Exception("Child returned {}".format(retcode))
Exception: Child returned 134

For the record I am running this on a vagrant machine. I'm going to get a virtual machine with X11 installed shortly.

@dakotabenjamin
Copy link
Member

SLAM works great, I'm pretty happy with it.
image

This was done with the Canon s100, about 20 seconds of video. I'm going to merge to master and then copy your wiki page over to ours and update the README. Do you think this will be compatible with 16.04 in the future?

@dakotabenjamin
Copy link
Member

Pushed to master 45f0317

@pierotofy
Copy link
Member

Nice!!

Is this going to require an X server instance running? Just wondering if this is going to break the docker build in any way.

@dakotabenjamin
Copy link
Member

It doesn't install by default so you shouldn't worry

@luizzod
Copy link

luizzod commented Jan 24, 2017

I managed to get this running on Ubuntu 16.04 by installing a previous version of Eigen.

But once it processes the frames it crashes...

Here's the output:

$ python run.py --project-path ../../Summit_WP1/ --video TestSummitWP1.mov --slam-config config.yaml --resize-to 1920
[INFO]    Initializing OpenDroneMap app - Tue Jan 24 11:10:07  2017
[INFO]    Running OMD Slam Cell
[DEBUG]   running cd /home/mrDrone/Summit_WP1/opensfm && /home/mrDrone/Downloads/OpenDroneMap-master/build/bin/odm_slam /home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/orb_slam2/Vocabulary/ORBvoc.txt /home/mrDrone/Summit_WP1/config.yaml /home/mrDrone/Summit_WP1/TestSummitWP1.mov

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!


Camera Parameters: 
- fx: 2020.32
- fy: 2021.67
- cx: 1918.67
- cy: 1063.36
- k1: -0.0179247
- k2: -0.0638714
- k3: 0.0292613
- p1: 0.000164744
- p2: -6.26266e-05
- fps: 30
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7
Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts.Start processing video ...
processing frame 0/718
trial 0
processing frame 1/718
trial 0
processing frame 2/718
trial 0
...
processing frame 717/718
trial 0
processing frame 718/718
trial 0
trial 1
trial 2
trial 3
trial 4
trial 5
trial 6
trial 7
trial 8
trial 9
trial 10
trial 11
trial 12
trial 13
trial 14
trial 15
trial 16
trial 17
trial 18
trial 19

Saving keyframe trajectory to KeyFrameTrajectory.txt ...

trajectory saved!
[DEBUG]   running cd /home/mrDrone/Summit_WP1/opensfm && PYTHONPATH=/home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages:/home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm python /home/mrDrone/Downloads/OpenDroneMap-master/modules/odm_slam/src/orb_slam_to_opensfm.py /home/mrDrone/Summit_WP1/TestSummitWP1.mov /home/mrDrone/Summit_WP1/opensfm/KeyFrameTrajectory.txt /home/mrDrone/Summit_WP1/opensfm/MapPoints.txt /home/mrDrone/Summit_WP1/config.yaml
[DEBUG]   running PYTHONPATH=/home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages /home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm/bin/export_bundler /home/mrDrone/Summit_WP1/opensfm
[DEBUG]   running PYTHONPATH=/home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages /home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm/bin/export_pmvs /home/mrDrone/Summit_WP1/opensfm --output /home/mrDrone/Summit_WP1/pmvs
Converting dataset [/home/mrDrone/Summit_WP1/opensfm] to PMVS dir [/home/mrDrone/Summit_WP1/pmvs]
Reconstruction 0
[INFO]    Running OMD Slam Cell - Finished
[INFO]    Running ODM CMVS Cell
[DEBUG]   Writing CMVS vis in: /home/mrDrone/Summit_WP1/pmvs/recon0/bundle.rd.out
[DEBUG]   running /home/mrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/bin/cmvs /home/mrDrone/Summit_WP1/pmvs/recon0/ 500 4
Reading bundle...0 cameras -- 0 points in bundle file

0 cameras -- 0 points
Reading images: 
Set widths/heights...done	0 secs
done	0 secs
slimNeighborsSetLinks...done	0 secs
mergeSFM...Floating point exception (core dumped)
Traceback (most recent call last):
  File "run.py", line 50, in <module>
    plasm.execute(niter=1)
  File "/home/mrDrone/Downloads/OpenDroneMap-master/scripts/cmvs.py", line 57, in process
    system.run('{bin} {prefix}/ {max_images} {cores}'.format(**kwargs))
  File "/home/mrDrone/Downloads/OpenDroneMap-master/opendm/system.py", line 28, in run
    raise Exception("Child returned {}".format(retcode))
Exception: Child returned 136

Slam is processed fine but CMVS fails now.

The video I'm using is 4K but only about 20 seconds. I made the calibration file using the steps described above and the actual camera on the drone. I get a core dump if I use more than 1000 "number of features". But it actually does process any video length and resolution as long as it's set to 1000. I tried using a 3 minute video and 3840 width and it worked but failed exactly the same as above.

config.yaml:

%YAML:1.0

#--------------------------------------------------------------------------------------------
# Camera Parameters. Adjust them!
#--------------------------------------------------------------------------------------------

# Camera calibration and distortion parameters (OpenCV)
Camera.fx: 2020.31868622
Camera.fy: 2021.67385448
Camera.cx: 1918.67277597
Camera.cy: 1063.35884263

Camera.k1: -0.0179246611676
Camera.k2: -0.0638714459813
Camera.p1: 0.000164744119286
Camera.p2: -6.26265990853e-05
Camera.k3: 0.0292612564

# Camera frames per second 
Camera.fps: 30.0

# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 1

#--------------------------------------------------------------------------------------------
# ORB Parameters
#--------------------------------------------------------------------------------------------

# ORB Extractor: Number of features per image
ORBextractor.nFeatures: 1000

# ORB Extractor: Scale factor between levels in the scale pyramid 	
ORBextractor.scaleFactor: 1.2

# ORB Extractor: Number of levels in the scale pyramid	
ORBextractor.nLevels: 8

# ORB Extractor: Fast threshold
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
# You can lower these values if your images have low contrast			
ORBextractor.iniThFAST: 20
ORBextractor.minThFAST: 7

#--------------------------------------------------------------------------------------------
# Viewer Parameters
#--------------------------------------------------------------------------------------------
Viewer.KeyFrameSize: 0.05
Viewer.KeyFrameLineWidth: 1
Viewer.GraphLineWidth: 0.9
Viewer.PointSize:2
Viewer.CameraSize: 0.08
Viewer.CameraLineWidth: 3
Viewer.ViewpointX: 0
Viewer.ViewpointY: -0.7
Viewer.ViewpointZ: -1.8
Viewer.ViewpointF: 500

@dakotabenjamin
Copy link
Member

Try rerunning with --use-opensfm-pointcloud

@luizzod
Copy link

luizzod commented Jan 24, 2017

I keep getting the same error..

@luizzod
Copy link

luizzod commented Jan 24, 2017

What exactly does {cores} stand for? Is it cpu cores?

and maybe this has something to do with the crash?

~/Summit_WP1/pmvs/recon0$ more pmvs_options.txt 
level 1
csize 2
threshold 0.7
wsize 7
minImageNum 3
CPU 8
setEdge 0
useBound 0
useVisData 1
sequence -1
timages -1 0 0
oimages 0
~/Summit_WP1/pmvs/recon0$ lscpu | egrep 'Thread|Core|Socket|^CPU\('
CPU(s):                4
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
Model name:            Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz

@dakotabenjamin
Copy link
Member

dakotabenjamin commented Jan 24, 2017

I realize now that --use-opensfm-pointcloud would never work because opensfm doesn't run. My bad.

Yeah maybe PMVS is trying to allocate too many cores. try --pmvs-num-cores 4

@luizzod
Copy link

luizzod commented Jan 24, 2017

It didn't work with either 4 or 3.

But in the pmvs options file it says CPU 8:

level 1
csize 2
threshold 0.7
wsize 7
minImageNum 3
CPU 8
setEdge 0
useBound 0
useVisData 1
sequence -1
timages -1 0 0
oimages 0

@dakotabenjamin
Copy link
Member

I have to reinstall the SLAM stuff but I'm looking into this. Are you willing to share your video publicly or privately?

@dakotabenjamin
Copy link
Member

When you installed the old version of Eigen was it because of this error?
croppercapture 3

@luizzod
Copy link

luizzod commented Jan 24, 2017

Yes that was the error.

I'm uploading the video now.

@luizzod
Copy link

luizzod commented Jan 24, 2017

I converted the video to 1080p for testing cause original is nearly a 1GB.
https://drive.google.com/open?id=0B93iG7nvjHdIeWZQS3dnRy1DWGs

@luizzod
Copy link

luizzod commented Jan 25, 2017

I'm tracking what programs are run and so far up to this point it seems ok:

Saving keyframe trajectory to KeyFrameTrajectory.txt ...

trajectory saved!

This is called by the C++ program OdmSlam. This program at the end is supposed to save the files.
SaveKeyFrameTrajectory(SLAM.GetMap(), "KeyFrameTrajectory.txt", "MapPoints.txt");

However it doesn't. It only creates the directories including images_resize but doesn't put anything but empty text files. For example, the files above are created but no information is input to them.


[DEBUG]   running cd /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm && PYTHONPATH=/home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages:/home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm python /home/MrDrone/Downloads/OpenDroneMap-master/modules/odm_slam/src/orb_slam_to_opensfm.py /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/TestSummitWP1.mov /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm/KeyFrameTrajectory.txt /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm/MapPoints.txt /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/config.yaml
[DEBUG]   running PYTHONPATH=/home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages /home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm/bin/export_bundler /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm
[DEBUG]   running PYTHONPATH=/home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/lib/python2.7/dist-packages /home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/src/opensfm/bin/export_pmvs /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm --output /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/pmvs
Converting dataset [/media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/opensfm] to PMVS dir [/media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/pmvs]
Reconstruction 0
[INFO]    Running OMD Slam Cell - Finished
[INFO]    Running ODM CMVS Cell
[DEBUG]   Writing CMVS vis in: /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/pmvs/recon0/bundle.rd.out
[DEBUG]   running /home/MrDrone/Downloads/OpenDroneMap-master/SuperBuild/install/bin/cmvs /media/MrDrone/QuarkBK/Drones/Postprocess/Summit_WP1/pmvs/recon0/ 500 4
Reading bundle...0 cameras -- 0 points in bundle file

0 cameras -- 0 points
Reading images: 
Set widths/heights...done	0 secs
done	0 secs
slimNeighborsSetLinks...done	0 secs
mergeSFM...Floating point exception (core dumped)
Traceback (most recent call last):
  File "run.py", line 50, in <module>
    plasm.execute(niter=1)
  File "/home/MrDrone/Downloads/OpenDroneMap-master/scripts/cmvs.py", line 57, in process
    system.run('{bin} {prefix}/ {max_images} {cores}'.format(**kwargs))
  File "/home/MrDrone/Downloads/OpenDroneMap-master/opendm/system.py", line 28, in run
    raise Exception("Child returned {}".format(retcode))
Exception: Child returned 136

Going a bit further with the programming.. it looks like the nothing is being written into the files needed for the next step.

GetMap() is simply:

Map *System::GetMap()
{
    return mpMap;
}

The call done by OdmSlam references the function GetMap() located in System.cc from the ORB_SLAM2 library. I'm digging in a bit further to see why the object is not being constructed correctly.

@dakotabenjamin
Copy link
Member

It could be that since you only recorded a single line with no lateral overlap, that SLAM is unable to get a reconstruction. I'll be able to corroborate your data issues shortly.

@dakotabenjamin
Copy link
Member

Have you tried reinstalling and checking for errors there? I just successfully ran:
odm_texturing.zip

@dakotabenjamin
Copy link
Member

It's not great because there's limited sidelap.

@dougajmcdonald
Copy link

Hi all, has there been any progress in this area recently? I'd like to be able to process video from sources other than direct from my drone using ODM.

I could probably manually capture images from the video and process in this way, but direct from video would be pretty awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants