Originally written about a month ago when I started this project. I will be posting more as I make progress.
Now that I finally have a Beaglebone Black, I can start to explore and have some fun. I want to get back to working on the SBot and with all the features I want to add, I was leaning towards an onboard Linux system with an Arduino or similar to do the low level timing stuff. Originally I wasn’t going to go the ROS route and write everything from scratch, but the more I dive into ROS (Robot Operating System), this seems the way to go.
So first things first, get ROS running on the BBB and see what I can do with it. It’s a little tricky getting to work and you have to setup cross compiling. It’s not too bad but it does take awhile to setup. Here is how I did it.
I found the Beagle-ROS project to get me started, at least pointing me in the right direction. First off, start with the section Getting ROSCORE running from https://github.com/vmayoral/beagle-ros. This gets you to the point where you can actually run ROSCORE. Only change I did: I used the stock image for the BBB instead of downloading Angstrom. Now there isn’t much you can do with that. The fun is adding packages and talking to hardware. My first goal is getting camera support but I may have to take it easy and do something that is ready for the BBB. I have a few Sharp IR sensors that may do the trick. Then comes the hard part: interfacing with a Arduino sketch to get motor control.
Once ROSCORE is running I needed to setup cross-compiling for Angstrom on a desktop. I have Ubuntu 12.04 LTS running on my VMWare ESXi server.
I started with this site:
Which worked for the most part but had issues with step 2. Then I found:
This site has a list of packages you need before you setup bitbake.
Finally, I found this site which gets you compiling a quick “hello world” c program to make sure you are in business.
Step 6 mentions commenting INHERIT += “rm_work”, but since I am working just on ROS packages I decided not to do that. It keeps the kernel sources, uses about 4Gb, but you may need them.
Found this site about commenting it out.
Here is the down and dirty:
Starting from your home directory:
sudo apt-get install sed wget cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath dosfstools kpartx
zlib1g-dev (this is needed later for compiling boost when doing recipes.)
git clone git://github.com/Angstrom-distribution/setup-scripts.git
./oebb.sh config beaglebone/
./oebb.sh bitbake virtual/kernel (takes awhile)
arm-angstrom-linux-gnueabi-gcc -o hello hello.c
Now you shouldn’t be able to run the output.
chmod +x ./hello
Then copy to your BBB and run. It should output “Hello BeagleBone world!”
I copied it over using SCP.
scp ~/BBB/hello user@beagleboneIP:~/
This confirms you are able to cross-compile and run it on the BBB.
Now it’s off to learn ROS packages and compiling using recipes! Yay!