Preparing for data collection with the Sensor Platform, which is now named ShallowCam.

Mission: Drift around Oso and collect georeferenced video.

A simple mission, but needs some software.

These notes will later become part of proper documentation.

Part 1: Get dynamic IP without a monitor.

The platform should work entirely without the need for display or input devices. Using SSH for headless use is the obvious solution, but requires knowing the target IP. On the campus wireless network, I am not sure that I can count on getting the same IP each time. So I made it post the output of ‘ifconfig’ to the joker server.

  1. On joker, create this structure:

     __mkdir platforms__
     __mkdir ShallowCam__
    
  2. On Odroid, create this structure:

     __mkdir ~/scripts__
     __mkdir ~/scripts/statusPages
    
  3. Create script: ~/scripts/statusPages/ifconfig.sh

     SCRIPTPATH="/home/odroid/scripts/statusPages"
     sleep 30 # This is to give odroid time to set up WIFI
     eval "$(ssh-agent)"
     ssh-add /home/odroid/.ssh/id_rsa
     date > $SCRIPTPATH/ifconfig.txt
     echo "" >> $SCRIPTPATH/ifconfig.txt
     ifconfig >> $SCRIPTPATH/ifconfig.txt ekrell@joker.tamucc.edu:platforms/ShallowCam/ifconfig.txt > $SCRIPTPATH/ifconfig.log
    
  4. Setup fake hardware clock

     Source: https://forum.odroid.com/viewtopic.php?f=141&t=20887
    
     __sudo apt-get install fake-hwclock__
     __sudo fake-hwclock__
    

Part 2: OpenCV

  1. Install

     Do this: https://github.com/nanuyo/opencvsh_for_ubuntu_mate/blob/master/opencv_install_to_ubuntu_mate_16.04.sh
    
     If you have trouble with any packages, enable the "multiverse" packages in apt sources
    
     Then fix an issue with a library: 
    
  2. Test it out with a simple script (Need to have USB camera plugged in)

     __python ~/scripts/demos/camTest.py__
    

Part 3: GPS

Sources:

  • https://bigdanzblog.wordpress.com/2015/01/18/connecting-u-blox-neo-6m-gps-to-raspberry-pi/
  • http://wiki.ambedded.com.tw/index.php?title=How_to_get_GPS_data_on_ubuntu
  • https://wiki.odroid.com/accessory/connectivity/usb_gps

Note that it can take a while to get a GPS fix.

  1. Install

     __sudo apt-get update__
     __sudo apt-get install gpsd gpsd-clients python-gps __
     __sudo apt-get foxtrotgps__
    
  2. Configure gpsd

     Modify this file: /etc/default/gpsd
    
     Only these:
    
     START_DAEMON="true"
     USBAUTO="false"
     DEVICES="/dev/ttyACM0"
     GSPD_OPTIONS="-n"
     GSPD_SOCKET="/var/run/gpsd.sock"
    
  3. Test GPS

     reboot
    
     __cgps__
    
  4. Test out python GPS (COMING SOON)