Robotics StackExchange | Archived questions

Building ORB_Slam on Raspberry PI

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.

Asked by Clapton-Is-God on 2016-05-04 04:15:16 UTC

Comments

Please format console copy/pastes using the Preformatted text button in the future. It's the one with 101010 on it.

As to your problem: do you have swap enabled on your system? If not, try that first. Compiling C++ can use quite some memory.

Asked by gvdhoorn on 2016-05-04 04:41:10 UTC

yes i have set up 1 GB of swap space on the board.

Asked by Clapton-Is-God on 2016-05-04 05:01:53 UTC

I'd try 2gb at least.

Asked by gvdhoorn on 2016-05-04 11:01:47 UTC

Just tried it with 2GB of swap space, and unfortunately the same error persisted.

Asked by Clapton-Is-God on 2016-05-04 11:26:16 UTC

Searching for that exact error message gets me this. Not sure if it's even related, but could be a hint. If possible, also try with more swap and / or monitor memory usage during compiling. 2GB might not be enough.

Asked by gvdhoorn on 2016-05-04 11:34:12 UTC

Answers

It's because your gcc is not new enough. You either have to fix some compiler flags, install a newer version of gcc, or use Ubuntu Mate which comes with a (new enough) gcc 5.4.

I actually share my experience building ORB-SLAM2 on Pi 3 here. I am not sure how relevant ORB-SLAM2 is to ORB-SLAM the original, but I suppose they should not be too different. And I did not use ROS. If you stick with ORB-SLAM and/or Raspbian Jessie and/or ROS, then you will have to adapt. I hope my sharing will help lead you in the right direction, even though it may not be totally applicable.

Asked by Nick Lee on 2016-12-12 07:51:35 UTC

Comments