I want to cross-compile ROS packages for BeagleBone Black running ubuntu 14.04. The BBB is running ROS indigo. I have been using [meta-ros](https://github.com/bmwcarit/meta-ros), which is a layer on top of Yocto (i.e. OpenEmbedded) build system, to cross-compile ROS stack and its dependencies. I followed [diving-meta-ros](https://github.com/vmayoral/diving-meta-ros) as a road-map to write bitbake recipes for cross-compiling my own ROS packages, which I could successfully run on my target system (BBB).
The only problem in this workflow is the footprint Yocto leaves on the disk - the build directory in which Yocto saves the cross-compiled binaries, fetched archieves of sources and all the byproducts of cross-compilation, grows upto **25 GB** with default configuration.
My questions are -
1. **Is there any way that I can reduce the overall amount of disk space utilized by Yocto, so that the above method still works on systems which have lesser resources (primarily disk space)?** I would like to have a solution which could take less than 10 GB disk space on the host system.
2. **Is there any other way to cross compile ROS stack and ROS packages which doesn't need Yocto?** I found out [this answer](http://answers.ros.org/question/191070/compile-roscore-for-arm-board/) which basically suggests to do all the things which Yocto and meta-ros do for us, and cross-compile the ROS applications against the cross-compiled libraries. I used some of the instructions which I describe in the next point.
3. I tried to use `-c populate_sdk` command the `bitbake`provides us with, and cross-compiling the ROS packages against the populated `sysroots` with arm-toolchain. I used `catkin_make` with my own `toolchain.cmake` file (which has all the information about my compilers, compiler flags and locations of cross-compiled libraries) to cross-compile ROS packages, but ran into some issues where catkin couldn't find the ROS packages (such as roscpp) and cross-compiled libraries (such as pthread). **Has anyone tried to follow this method to cross-compile ROS packages, where you provide your own toolchain.cmake file to point to the cross-compiled libraries and binaries?**
Any pointers regarding these three points (and in-general cross-compiling ROS packages) would be really helpful.
Thanks in advance.
↧