Skip to content

Instantly share code, notes, and snippets.

@westphallm1
Created April 10, 2019 19:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westphallm1/f15342948adc836883b13fed520206f9 to your computer and use it in GitHub Desktop.
Save westphallm1/f15342948adc836883b13fed520206f9 to your computer and use it in GitHub Desktop.
Installing the Spinnaker SDK on a BeagleBone Black

Beaglebone Spinnaker Setup

These steps describe using an Ubuntu desktop environment to install Ubuntu and the Spinnaker Python interface on a Beaglebone Black. Commands to be run on the desktop are prefaced with (desktop)$, and commands to be run on the Beaglebone are prefaced with (beagle)$

  1. Flash the latest Beaglebone Ubuntu image (at the time of writing: 18.04) to an SD card by following these instructions

  2. Boot the Beaglebone from the SD card (hold down the USER/BOOT button and then plug it in)

  3. Ensure a new network interface has appeared on your desktop:

    (desktop)$ ip a
    
  4. SSH into the beaglebone:

    (desktop)$ ssh ubuntu@192.168.7.2
    

    Username: ubuntu. password: temppwd. If these login credentials don’t work, it’s possible that the Beagleboard booted into its onboard Debian image instead of Ubuntu.

  5. Perform basic software updates on the beagleboard:

    (beagle)$ sudo apt update && sudo apt upgrade
    
  6. Go to the FLIR File Download website for your camera. The software downloads will require a free FLIR account.

  7. On the FLIR website, find the latest Linux Ubuntu ARM Operating System version that has support for 32 bit software packages. At the time of writing, this is 16.04, which is outdated compared to the Beaglebone image. This will require some extra setup later on.

  8. Download the ARMHF/ARMV7 packages for the Spinnaker SDK and Spinnaker Python interface, and transfer them to the beagleboard. Eg:

    (desktop)$ scp spinnaker-1.*-pkg.tar.gz spinnaker_python-1.*armv7l.tar \
     ubuntu@192.168.7.2:~
    
  9. On the beagleboard, untar the spinnaker sdk and enter the untarred directory

    (beagle)$ tar -xf spinnaker-1.*-pkg.tar.gz
    (beagle)$ cd spinnaker-1.*-armhf
    
  10. Read the README file fully, then run the install script. Eg:

    (beagle)$ sudo sh install_spinnaker_arm.sh
    
  11. You will probably run into some dependency issues while installing the SDK. If that’s the case, missing packages can be installed manually with

    (beagle)$ sudo apt install <name-of-missing-package>
    

    If a required package isn’t found by apt, see section "Adding Packages from Previous Ubuntu Versions".

  12. Change back to your home directory, untar the python interface, then untar the python 3.6 interface and change directories into it.

    (beagle)$ tar -xf spinnaker_python-1.*armv7l.tar
    (beagle)$ tar -xf spinnaker_python-1.*cp36*.tar.gz
    (beagle)$ cd spinnaker_python-1.*-cp36 
    
  13. Read the README.txt fully, then install numpy and the python interface:

    (beagle)$ python3 -m pip install numpy  # this may take several hours
    (beagle)$ sudo python3 -m pip install spinnaker_python-1.*.whl
    
  14. Ensure the python module can be imported successfully:

    (beagle)$ python3 -c 'import PySpin'
    (beagle)$ echo $? # should print 0
    

    You will probably run into more dependency issues here, specifically the ffmpeg development headers. See step 11 and section "Adding Packages from Previous Ubuntu Versions" for help resolving these issues.

Adding Packages from Previous Ubuntu Versions

At the time of writing, FLIR stopped providing support for 32 bit Ubuntu ARM after version 16.04. The Ubuntu 16.04 SDK can still be installed on later versions of Ubuntu, but may depend on packages that are no longer included in the default apt repositories. To add 16.04 repositories to later versions of Ubuntu, follow the steps below:

  1. Install the apt-add-repository utility

    (beagle)$ sudo apt install software-properties-common
    
  2. Use apt-add-repository to make Ubuntu 16.04 packages available for installation

    (beagle)$ sudo add-apt-repository "deb http://ports.ubuntu.com/\  
    xenial main universe multiverse"
    

    The key part here is the "xenial", which is the release name for Ubuntu 16.04. Other release names can be found here

  3. Install any needed 16.04 packages with apt, as normal:

    (beagle)$ sudo apt install <name-of-missing-package>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment