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.
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.
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.
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:
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.
Prepare mjpg-streamer for make:
tar zxf 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:
git clone git://github.com/OpenROV/openrov-software.git
Change to development branch:
git checkout development
edit ~/.bashrc, add:
You’ll need to restart your shell:
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
npm install express socket.io serialport
Completed this step ok and had enough modules to start testing. I did this from root directory.
Restarted shell with
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.