Hi,
does anybody know, how to minimize the memory needed for gcc/g++ to compile a particular package? I'm trying to compile the pcl_ros package on a BeagleBoard-xM, but the compiler crashes each time because the cc1plus process is being killed due to low memory (BB-xM has 500MB of RAM). I've read a lot about this already, but found no solution. I've already been able to compile openni and flann (which also caused errors).
The only thing I'd like to try out and wasn't still able to is adding a "-finline-limit 600" (the number here may differ) compiler flag, as I don't know how to use the rosbuild_add_compile_flags(target flag) macro in case of flags with values.
Any help would be appreciated. I think being able to use Kinect on an ARM based board would be great and the effort is well worth it. Among small single board computers, ARM based boards cost 10 times less than, for instance, the AscTec Atom with similar capabilities.
Also, if anyone out there has got a PandaBoard and would like to check whether what I've found out so far works with it, please let know.
Cheers, Tom
Coming from an embedded systems background, when working with resource-limited embedded systems the usual solution is to cross-compile. You'd gain compilation speed (assuming your desktop has better specs than a 500MB-RAM Cortex ARM) as well as bypass memory problems like the one you're having.
The eros stack was started a while back to help get ROS onto more embedded systems. I'm not sure how far along it is, but there seems to be some helpful tutorials:
use a cross compiler on your workstation
Jeff's right, if you're investing a serious amount of work in small cpu's (year long project or more), you'll drink far too much coffee waiting for your compiling to complete. Growing a beard and cross compiling can save you a tremendous amount of time.
If you've a toolchain, then eros has cross-compiling tools and support for at least the core ros packages. Getting everything to work all the way out to pcl-land on ros may require some extra work (thats where you can do your bit for eros - patches and information are welcome!). It's definitely a nice target though, specially with the near future looking at running gpu'd pcl on arm+nvidia combination boards.
One area where eros is lacking at the moment is in information on how to roll your own filesystems/toolchains and we'll start looking at remedying that in the near future.
I think using swap partition gonna be solution for your problem. I'm also trying to run openni on the Gumstix (the same core as BB as far as I know) but haven't compiled PCL yet. How could you get dependent libraries which doesn't exist for ARM core like hull hd5(I can't remember correct lib name). Cheers.
I've dealt with a similar issue through using swap partition. For the instructions to configure swap space on Ubuntu click the following link: http://manpages.ubuntu.com/manpages/maverick/en/man8/dphys-swapfile.8.html
Swap space on angstrom: http://www.sakoman.com/GNOME/how-to-enable-linux-swapping.html
Thanks all,
for the time being, I can confirm that it's possible to use Kinect with ROS on a BeagleBoard-xM. As I'm not experienced in the embedded world, I took the easiest way for me and used Nizar's advice to change set (ROS_BUILD_TYPE RelWithDebInfo) to set (ROS_BUILD_TYPE Release) in the CMakefile. It took 3 hours to build this directly on the BB and I also had to turn swap on (which is not healthy for a flash memory), but it worked. I've been able to use dynamic_reconfigure over WiFi and changed to QQVGA@30Hz and then to subscribe to /camera/depth/points2 locally (rostopic hz showed 4,5Hz).
I still wasn't able to use rviz nor even subscribe to a topic on my PC over a WiFi, but this must be an issue with my USB-dongle's drivers.
Do you have any hints on how I can minimize processor's load even more? Basically I'd like my BeagleBoard to work as a Kinect WiFi interface for now. I guess it's possible to switch do UDP, would it be wise in my case?
Naturally I'll work on cross-compiling as soon as I get this one last issue rolling.
Any suggestions welcome, Tom.
Asked: Feb 24 '11
Seen: 271 times
Last updated: May 19 '11
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.