tum-vision / dvo_slam

Dense Visual Odometry and SLAM
632 stars 306 forks source link

dvo_slam benchmark ROS indigo runtime error #20

Open K1lroy09 opened 9 years ago

K1lroy09 commented 9 years ago

Hi,

I ported the dvo_slam package to ROS Indigo successfully without any compilation problems. I would like to reproduce the results obtained in "Dense visual slam for RGB-D cameras" for an evaluation framework I am busy working on. I have tried several of the RGB-D benchmark sequences and I get the same error just at different time stamps. The trajectory is estimated succesfully for a few frames and then I receive the follwing error in gdb:

dvo_slam_error

Just to confirm, the assoc.txt file required is just the associate.py script executed on depth.txt and rgb.txt in the sequence folder? The trajectory.txt output shows that the trajectory is estimated for several frames and then just stops. This seems to be the same error as #18 by jefftee.

EDIT 2015/09/24: The segmentation fault seems to occur at "g2o::VertexSE3* frame_vertex = new g2o::VertexSE3()"; in the "g2o::VertexSE3* addFrameVertex" function in the file "local_map.pp". This error persists even if I use the old g2o framework with the old addFrameVertex function.

Any help would be greatly appreciated.

Thanks

jefftee commented 9 years ago

Yes, same error as mine (https://github.com/tum-vision/dvo_slam/issues/18). I get the same error whether I'm running it with the benchmark or with a live camera.

I believe it's crashing on the next line:

2o::OptimizableGraph::EdgeSet::iterator e = std::find_if(last_kv->edges().begin(), last_kv->edges().end(), FindEdge(next_keyframeid - 1, next_odometry_vertexid));

where it is having issues resolving last_kv->edges().begin() (the STL error)

jefftee commented 9 years ago

Think I found the issue and solution, though I haven't tested it rigorously yet and my initial attempt at running the benchmarking is stalling somewhere.

The symptom that is seen is a result of last_kv being 0 because the vertex cannot be found:

(line 746 in keyframe_graph.cpp)

    g2o::VertexSE3* last_kv = (g2o::VertexSE3*) keyframegraph_.vertex(next_keyframe_id_ - 1);

The reason is that lines with assert are not being executed: (line 777 in keyframe_graph.cpp)

    // get last odometry vertex from global graph, which will become new keyframe vertex
    g2o::VertexSE3* kv = (g2o::VertexSE3*) keyframegraph_.vertex(next_odometry_vertex_id_);
    assert(kv != 0);
    assert(keyframegraph_.changeId(kv, next_keyframe_id_));

Removing the assert statement worked for me. So replace the above lines with:

    // get last odometry vertex from global graph, which will become new keyframe vertex
    g2o::VertexSE3* kv = (g2o::VertexSE3*) keyframegraph_.vertex(next_odometry_vertex_id_);
    assert(kv != 0);
    keyframegraph_.changeId(kv, next_keyframe_id_);
K1lroy09 commented 9 years ago

That seems to sort out the problem on my side. Thanks for the fix!! :). I get the same stalling problem when running the benchmark.

K1lroy09 commented 9 years ago

I sorted out the stalling problem by using keep_alive:=false.

jefftee commented 9 years ago

Awesome!

Yes, I was going to try keep_alive:=false so glad that works. Thanks!

alexbo1 commented 9 years ago

I'm new to ROS and would like to use the dvo_slam package on Indigo. I fear it will take quite some time to figure out how to reproduce the port myself.

Since you already did it, help would be greatly appreciated.

jefftee commented 9 years ago

I forked dvo_slam and checked in the ports/fixes for ROS Indigo. You can find it here:

https://github.com/jefftee/dvo_slam

The branch you want to clone is indigo-develop.

alexbo1 commented 9 years ago

Thanks a lot. I checked out the repository, but I still get errors with opencv2:

 [rosbuild] Building package dvo_core
 Failed to invoke /opt/ros/indigo/bin/rospack deps-manifests dvo_core
 [rospack] Error: package 'dvo_core' depends on non-existent package 'opencv2' and rosdep claims    that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'

 CMake Error at /opt/ros/indigo/share/ros/core/rosbuild/public.cmake:129 (message):

Failed to invoke rospack to get compile flags for package 'dvo_core'.  Look
above for errors from rospack itself.  Aborting.  Please fix the broken
dependency!

 Call Stack (most recent call first):
/opt/ros/indigo/share/ros/core/rosbuild/public.cmake:207 (rosbuild_invoke_rospack)
CMakeLists.txt:12 (rosbuild_init)

 -- Configuring incomplete, errors occurred!

Any ideas?

K1lroy09 commented 9 years ago

Remove the line in the manifest.xml. If I can remember correctly you will have to do this for the dvo_core, dvo_slam, dvo_ros, and dvo_benchmark packages. There might also be other dependencies listed in the manfiest.xml files not listed in the CMakeList which you will have to remove as well.

jefftee commented 9 years ago

K1lroy09, out of curiosity, what are you working on? Happy to take this to email if you don't want to broadcast publicly.

K1lroy09 commented 9 years ago

Sure, lets communicate via email for the sake of keeping the issue thread clean.

jefftee commented 9 years ago

Sounds good. You can shoot me an email at jeff(at)wearanalytics.com.

wudanhxh commented 7 years ago

Hi, I want to run TUM dvo slam package in my ROS indigo. ( https://github.com/tum-vision/dvo_slam ) It is available only for an old version of ROS(feurte) according to its documentation. How to install and run it?Thanks!

songuke commented 7 years ago

There is a forked version of dvo_slam that can be compiled with ROS Indigo: https://github.com/songuke/dvo_slam

2016-12-12 10:37 GMT+08:00 wudanhxh notifications@github.com:

Hi, I want to run TUM dvo slam package in my ROS indigo. ( https://github.com/tum-vision/dvo_slam ) It is available only for an old version of ROS(feurte) according to its documentation. How to install and run it?Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tum-vision/dvo_slam/issues/20#issuecomment-266330735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIXsvuk2My_JQdcVKwPOih7RIxy9nbNks5rHLNXgaJpZM4Cnn26 .

wudanhxh commented 7 years ago

Thanks a lot!

发自我的 iPhone

在 2016年12月12日,10:52,Binh-Son Hua notifications@github.com 写道:

There is a forked version of dvo_slam that can be compiled with ROS Indigo: https://github.com/songuke/dvo_slam

2016-12-12 10:37 GMT+08:00 wudanhxh notifications@github.com:

Hi, I want to run TUM dvo slam package in my ROS indigo. ( https://github.com/tum-vision/dvo_slam ) It is available only for an old version of ROS(feurte) according to its documentation. How to install and run it?Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tum-vision/dvo_slam/issues/20#issuecomment-266330735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIXsvuk2My_JQdcVKwPOih7RIxy9nbNks5rHLNXgaJpZM4Cnn26 .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.