raulmur / ORB_SLAM

A Versatile and Accurate Monocular SLAM
http://webdiis.unizar.es/~raulmur/orbslam/
Other
1.52k stars 819 forks source link

Building on Raspberry PI #108

Open e-maalouly opened 8 years ago

e-maalouly commented 8 years ago

Is it possible for ORB Slam to work on raspberry pi? I have been trying to build it on a rpi 3 with raspbian jessie and ROS Indigo. I get the following error when trying to build g2o using make:

_Scanning dependencies of target g2o [ 3%] Building CXX object CMakeFiles/g2o.dir/g2o/types/types_sba.cpp.o * Error in `/usr/bin/c++': double free or corruption (top): 0x00c7a348 CMakeFiles/g2o.dir/build.make:54: recipe for target 'CMakeFiles/g2o.dir/g2o/types/types_sba.cpp.o' failed make[2]: \ [CMakeFiles/g2o.dir/g2o/types/types_sba.cpp.o] Aborted CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/g2o.dir/all' failed make[1]: * [CMakeFiles/g2o.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *\ [all] Error 2_

Does anyone know how to solve this? Any help would be appreciated. Regards.

riematrix commented 8 years ago

@Clapton-Is-God Hi, the key message is "double free or corruption". I used to compile the project on Pi3 after adding an option in CMakelists.txt but i can't remember it now. However i couldn't run the program on my raspberry pi. It keeps showing thread error or bus error that I almost give up.

ffntl commented 8 years ago

I found the solution to run ORB_SLAM2 on the RPi2 but it is still 3x slower than the normal performance:

For the compilation:

It takes around 2min40 to load the ORB Vocabulary.

riematrix commented 8 years ago

Thank you so much for sharing this! @fannief

BTW, the lode process could be much faster if you merge this binary vocabulary version. On my Pi3 it takes about 10 seconds.

hyqneuron commented 8 years ago

@fannief May I ask what kind of framerate are you getting and what settings are you using? I used the default compilation flags and tried the default setting (TUM1.yaml) and seemed to be getting 2~3fps on RPi2 with a webcam.

hyqneuron commented 8 years ago

@riematrix How's the performance on RPi3?

ffntl commented 8 years ago

The settings depend on the dataset you are using, I tried to decrease at maximum the number of ORB features and the number of pyramid scales (most time consuming). I did also some modifications inside the code to get a framerate around 3-4fps for the KITTI dataset (07) and ~3fps for real time dataset with stereo camera, VGA images, 20fps. You can also try to add NEON instructions to speed up a bit more (I didn't try, but why not). I couldn't record images and run ORB SLAM at the same time on the RPi, I had to use WiFi/Ethernet to get the frames in real time. RPi2 is very limited :/ I didn't try with RPi3

hyqneuron commented 7 years ago

@fannief 20fps with VGA images?! May I know what exact settings are you using (number of points, scale and number of levels)? I'm using a VGA webcam and I'm only getting about 3fps on RPi3, with nFeatures=500, scaleFactor=1.5 and nLevels=3.

ffntl commented 7 years ago

20fps is just the input, my stereo camera frame rate. ~3fps is the output. It will be hard to do better than 4fps.

diophantine86 commented 7 years ago

i build orbslam2 on raspberry pi3. but this occurs eigen dense storage error.

zanazakaryaie commented 7 years ago

Hello

Thanks for sharing

I have installed it on Rpi2 successuflly but when I run kitti example it first loads vocabulary and then throws an error:

Pangolin X11: Unable to retrieve framebuffer options

What should I do?

ffntl commented 7 years ago

https://github.com/raulmur/ORB_SLAM2/issues/4 @'sunstarchan commented on Feb 1, 2016'