note 1 Beaglebone Black: Boot attempt using OPENROV image

August 9, 2013

As mentioned in my last Arduino post, the 599 Algilita ROV team selected the OPENROV processing architecture for their ROV.   It was hoped that this would save us a lot of time setting up the cockpit display software which is already working on OPENROV.   Ha…think again.   Unfortunately, the OPENROV flash image which works so nice in the Beaglebone doesn’t seem to boot with the Beaglebone Black (BBB), at least for me.

Flashing the OPENROV image to BBB (unsuccessful)

The BBB uses a built-in eMMC to boot from normally.   To flash a new image you insert a micro SD MMC and while holding down the User (boot) button on the BBB you power up the board either by USB or 5v power supply.  Continue to hold the button until the user LED’s begin to blink (See flashing procedure),  The BBB board is then boots up and transfers the image from the micro SD to the built-in eMMC.

I made a bootable 8GB micro SD card using the Windows solution outlined in the Getting Started link  github.com/OpenROV/openrov-image.   I held the boot button down, powered up and waited for over 5 minutes for the user LED’s to light, but only the power LED lit.

I searched the forums and only found one comment re the BBB not being able to flash the OPENROV-image.  Apparently some modifications need to be made to the uSD 64K partition that contains a file called

I did check that I could flash something by starting with a fresh Angstrom image and booted that ok.


note 2 BeagleBone Black:building OpenROV software with Angstrom

August 9, 2013

I decided to try to get the OpenROV software working using the demo Angstrom distribution that comes installed in the BBB since it has a lot of the needed packages already installed and you don’t need an Ubuntu SD image.   There are 13 installation steps in the OpenROV/openrov-software/Readme.md file shown here.  I skipped step 1 since I am using Angstrom.  I postponed Step 2 for later if I get everything else working.

Step 3

upgrade software and install rerequisits (holy moly, there’re packages!):

sudo apt-get update
sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake

I verified that most of the required packages were already installed and found only “build-essentials” missing from Angstrom.  Those that were installed were updated with opkg.

build-essentials was not found in searching Angstrom opkg.   However,  I did find packagegroup-core-buildessential-dev 1.0-r0.1 .  I installed this with opkg and seemed to work.

Installing SUDO:

Using opkg search I couldn’t find  a sudo package.  I did find an Angstrom dev package for sudo and installed that by downloading it to my computer from here and copying it to the BBB root.   I then used

root:/# opkg install ./sudo_1.8.4p4-r1_armv7a.ipk

The program unzipped the ipk package and successfully installed  sudo.

Step 4:

Install nvm (Node Version Manager):

git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> .bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> .bashrc
echo "export PATH=$PATH:/opt/node/bin" >> .bashrc

And make those changes work now:

source ~/.bashrc

I followed these instructions and tried to install node v0.8.11 as per Steps 5 thru 7  but ran into a missing Python compiler.ast error so I opkg updated the Python compiler and then things worked.   Since Angstrom has v0.8.2 node installed already, I don’t think it is necessary to install v0.8.11 but I have yet to try this.

No /opt/ directory

It seems that my Angstrom dist doesn’t have an opt directory and I am not sure why since it is standard in the LInux directory tree.  Also many of the paths in OpenROV software assume it is populated.   My solution was to create the directory.   Later I would install OpenROV software into it.

Step 8

Install mjpg-streamer

Download mjpg-stream:

 wget http://downloads.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz

Prepare mjpg-streamer for make:

tar zxf mjpg-streamer-r63.tar.gz
cd mjpg-streamer-r63.tar.gz

Make and install OpenCV:

make && sudo make install

The r63.tar.gz package would not install because of  fatal error: videodev.h No such file or directory .   Apparently it uses videodev.h instead of videodev2.h which is in more recent library distributions of Linux..at least in my version of Angstrom.  I tried to fix it by just changing all the videodev.h to videodev2.h in all the source files that need it.  I got it to compile through most of the files but ran into some other problem which I don’t recall right now.   So I gave up and found a more recent version of mjpg-streamer on the github.com site that uses vidodev2.h.  You can download this from Dominik’s codewithpassion site as “mjpg-streamer or the sourceforge site that it is branched from.  You know you have the right version if mjpg_streamer.c has <linux/vidoedev2.h>.

I actually installed mjpeg-streamer-experimental in /root rather than /~ and tested it standalone and it seems to work fine with Chrome except there is about .5 second delay in the image.  I understand that the delay is roughly .2 to .3 seconds with Firefox browser but I didn’t try it.

Step 9 Download OpenROV ROVision:

cd ~
git clone git://github.com/OpenROV/openrov-software.git
cd openrov-software/

Change to development branch:

git checkout development

edit ~/.bashrc, add:

export LD_LIBRARY_PATH=/usr/local/lib

You’ll need to restart your shell:

source ~/.bashrc

Git OpenROV-software

Ok I did all this but I could not checkout development branch…it said that it didn’t exist.  I decided to use Dominiks codewithpassion/OPENROV code since it probably was more recent and also had a development branch which I checked out to 599ROV branch.

git clone git://github.com/codewithpassion/openrov-software/

git checkout remote/origin/development -b 599ROV

Step 10

Download modules:

npm install express socket.io serialport

Completed this step ok and had enough modules to start testing.  I did this from root directory.

Preliminary tests:

Restarted shell with

source  ~/.bashrc

node app

and got error that “forever-monitor’ module could not be found.   This is located in node.   I fixed this by reinstalling node in root rather than home.  The is is because the openrov software is now installed in /opt  I think.

Cockpit display now works and includes the Genius camera image!!

The next note will be on getting the Arduino firmware loaded to the OPENROV Cape.