IRVLab / direct_stereo_slam

Fast Direct Stereo Visual SLAM
GNU General Public License v3.0
99 stars 16 forks source link

The program runs very slowly #5

Closed empty-spacebar closed 1 year ago

empty-spacebar commented 1 year ago

I have successfully run DSV with my own stereo camera, however the FPS is very low, about 1Hz. Note that i have configured the parameter "nomt" to match my platform.

jiawei-mo commented 1 year ago

Hi,

Thank you for your interest in this work. What type of platform you are using? Turning off multi-threading will inevitably slow the system down. We suggest not to use 'nomt' for efficiency.

Best, Jiawei

empty-spacebar commented 1 year ago

Hi,

Thank you for your interest in this work. What type of platform you are using? Turning off multi-threading will inevitably slow the system down. We suggest not to use 'nomt' for efficiency.

Best, Jiawei

I have tried not using 'nomt', it performs the same. The platform i use is 4 core arm cortex a55. By the way, it's extremly wired that the program run slowly but the CPU occupation is only about 50% with 'nogui' ON. Thanks for replying

jiawei-mo commented 1 year ago

We were mainly tested on a x86 platform. We believe that you could achieve high PFS on x86 platforms. We unfortunately have not tested on ARM platforms. But I would try the sse2neon mentioned in DSO and verify that DSO is able to run efficiently on ARM; after that, our direct_stereo_slam is hopefully able to run efficiently.

empty-spacebar commented 1 year ago

We were mainly tested on a x86 platform. We believe that you could achieve high PFS on x86 platforms. We unfortunately have not tested on ARM platforms. But I would try the sse2neon mentioned in DSO and verify that DSO is able to run efficiently on ARM; after that, our direct_stereo_slam is hopefully able to run efficiently.

I have done the test of running DSO_ros just now. Here's the detail: input data: 640x480, grayscale, 30Hz parameter: nogui=1, vignette=1, gamma=0, activePoints:1200,pointCandidates:1000,maxFrames=7(default) output data: basically real-time, CPU occupation: about 65%

jiawei-mo commented 1 year ago

Cool, is that on ARM or x86?

empty-spacebar commented 1 year ago

The platform mentioned above, 4-core ARM cortex a55, only running on CPU

jiawei-mo commented 1 year ago

That's a great indication. If you optimize our code for ARM, it is very likely that it could run much faster. The scale optimizer is implemented similarly to DSO, so as the pose estimator in the loop closure, optimizing these two modules for ARM should not be too hard. However, optimizing the loop detection module might take time since the current implementation did not consider running on ARM.

empty-spacebar commented 1 year ago

I have compared the SSE function between DSO and DSV, they're basically the same, so i guess it's not about SIMD problem since DSO with the same function runs well. And DSV can't run on ARM if 'SSE2NEON.h' doesn't work.

I have no idea about the difference between X86 and ARM except SIMD. :-(

One more thing, I also tested DSV on my intel i7-12700, it runs as slow as ARM when photometric-calibration is ON. When off, it runs real-time. But it runs slowly on ARM no matter photometric-calibration is ON or OFF. This situation may helps you.

I will continue reading DSV code and finding the potential BUG anyway, your idea of using LiDAR descriptor on semi-sparse point is inspiring.