LiuLimingCode / HFNet_SLAM

HFNet-SLAM: An accurate and real-time monocular SLAM system with deep features
79 stars 15 forks source link

Test with Stereo #13

Open martinakos opened 6 months ago

martinakos commented 6 months ago

I want to test HFNet_SLAM with the stereo setup that ORBSLAM3 provides and using the ROS interface. To do that I've copied Examples/ROS/HFNet_SLAM/src/ros_stereo.cc from ORBSLAM3 to the corresponding folder in HFNet_SLAM and adapted it so that it doesn't expect a vocabulary file, as ORBSLAM3 does. Build it and test it with a configuration that works with ORBSLAM3 Stereo.

The HFNets for each pyramid layer load correctly and the Pangolin viewer appears. However, when I start streaming a sequence with stereo images HFNet_SLAM crashes with this error:

Initialization of Atlas from scratch 
Creation of new map with id: 0
Creation of new map with last KF id: 0
There are 1 cameras in the atlas
Camera 0 is pinhole
Starting the Viewer
1
ERROR: 1: [graphContext.cpp::updateAndLoadGraph::33] Error Code 1: Myelin ([myelinGraphLoad] Called with an already loaded binary graph.)
Error while detecting keypoints
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.2.0) ../modules/core/src/matrix_operations.cpp:111: error: (-215:Assertion failed) src[i].dims <= 2 && src[i].cols == src[0].cols && src[i].type() == src[0].type() in function 'vconcat'

The stack a the crash point looks like this: image

I suspect that as we have to extract points on the left and right images maybe the HFextractor is loaded twice and that doesn't work??

I wonder if anybody has some suggestion on how to solve this crash so that I can test HFNet_SLAM with a stereo sequence.