Previously I setup ROS on the BeagleBone Black and installed Angstrom build environment on Ubuntu x86 so I can compile for ARM. Now that the base is setup we can add the Beagle-Ros layer and try cross compiling a recipe with Bitbake. Wait, what… what is layers and baking recipes you speak of, are we cooking?
Since we can’t compile directly on the BBB we have to do it on a x86 system. But we have to tell the compiler the architecture we want and how to package it up into a IPK that we can install on the BBB. The IPK needs to have all the right parts to make a ROS package. But you can test using just python scripts without make the compiled package.
The base install uses OpenEmbedded then there are layers on top of that to add functionality such as a meta ROS layer. This layer provides all the sources files to compile ROS. This should be in the
setup-scriptssourcesmeta-ros
On top of that Victor from Beagle-Ros.org created a layer for the Beaglebone parts. Which include recipes for some of the common sensors and parts you can use with the BBB. He is slowly merging them with the meta-ros layer.
Once setup, bitbake will read the recipe and compile the package you create into an IPK you can install on the BBB and run with ROSRUN or ROSLAUNCH.
Now time to get your hands dirty:
Make sure you have previously setup your build environment and ROS on the Beagle Bone Black. You don’t have to use the beagle-ros layer, meta-ros has most of what you need. But this is a good way to learn how to add custom layers.
Download the beagle-ros layer.
cd ~/BBB/setup-scripts/sources
git pull https://github.com/vmayoral/beagle-ros
Then we need to add it as a valid layer so bitbake knows about it.
cd ..
cd conf
nano bblayers.conf
Inside the first variable BASELAYERS add the following as another line inside the quotes/
${TOPDIR}/sources/beagle-ros
Now we can trying baking
cd ..
if this is a new session you have to set the build environment otherwise your system can’t find bitbake
. ~/.oe/environment-angstromv2012.12
bitbake bb_share_ir
This can take awhile to compile packages that haven’ t been compiled. Over time you will have to less compiling for new packages since they will be already.
I use screen (opkg install screen) so that if I loose connection, I can SSH back in and reconnect without interrupting the bake.
Once completed we can copy the IPK to the BBB. You will find it in the following place
~/BBB/setup-scripts/deploy/…
A big thanks to Victor and all his help who without none of this would of been possible for me,