Skip to content
AUV onboard controller
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
pytest.ini Add Makefile, update docker-compose and playbook Nov 26, 2018 Add comments and improve readability Aug 12, 2018
requirements.txt add Nov 26, 2018

AUV Control PI

Raspbery Pi based onboard controller for the AUV.

This is the main brains of the AUV and manages communication between the frontend, server and the hardware/navigation systems.



The Navio has all the I/O controlls including an integrated GPS, and 9-axis IMU.


RC Control


The code is broken up into individual components that communicate via RPC + Pub/Sub using the Crossbar WAMP router and autobahn components.

All the sensors have their own components that publish data over the which any other component can subscribe to. The idea here is to decouple the low level sensors and output devices from the higher level control code which allows easy prototyping of different control implimentations.

A Django app is provided for managing config variables in the Django admin interfce and allowing components to get access to the Django ORM to write data to the database and use the configurations stored in the database.


Writing Components

New components should be put in the auv_control_pi/components/ folder.

Below is an example of a component with rpc/subsriptions/publishing is shown below.

from auv_control_pi.wamp import ApplicationSession, rpc, subscribe

class NewComponent(ApplicationSession):

    def call_me(self, val):
        """This is an RPC method since we used the @rpc decorator""""
        # do stuff
   def handle_gps(self, data):
       """Handler to the subscription to `gps.update` topic"""
       # process data that is being published by the gps component
   async def update(self):
       """The `update` method will be run in the asyncio event loop
       Put logic here that needs to run indefinately.       
       while True:
           # do cool stuff

           # build a payload to publish
           update_payload = {} 

           # publish updates so other components can subscribe to       
           self.publish('new_component.update', update_payload)

           # sleep a bit at some frequency
           await asyncio.sleep(0.1)         


$ docker-compose build
$ docker-compose up

Raspberry PI

Follow the navio instructions to setup the RasPi using the custom Navio Raspbian image:

Install Docker:

$ curl -fsSL -o && sh

Setup docker to run without root permissions:

$ sudo groupadd docker
$ sudo gpasswd -a $USER docker
$ newgrp docker

Test things have installed correctly try running a hello world conatiner:

$ docker run hello-world

Install Docker Compose

As of writing this the easiest way to install docker-compose on ARM is using pip.

$ sudo pip install docker-compose

Test the installation:

$ docker-compose --version

Run AUV Control

$ git clone  trol-pi.git
$ cd auv_control_pi
$ docker-compose build
$ docker-compose up
You can’t perform that action at this time.