Goby v2
goby-moos: An overview of the Goby/MOOS interoperability library

Table of Contents for goby-moos: An overview of the Goby/MOOS interoperability library.

iFrontSeat

iFrontSeat is a MOOS application used to interface a Goby/MOOS community (the "backseat") running pHelmIvP with a given manufacturer's vehicle (the "frontseat"). The usage of iFrontSeat and the existing driver suite is explained in the Goby user manual (see Resources).

Writing a new driver for iFrontSeat

Overview

iFrontSeat is intended to interface to a wide range of vehicles using any interface (e.g. proprietary extensions of NMEA-0183). The purpose of the driver is to implement the Goby FrontSeatInterfaceBase in the language of the particular frontseat vehicle system. Minimally, these are the requirements of the frontseat:

Additionally, the frontseat may provide or consume:

State charts

The state of iFrontSeat (as shown in the following diagram) is determined by a combination of the state of the frontseat and the state of pHelmIvP. Only the state of the frontseat must be determined by each new driver, as the state of pHelmIvP is determined by code shared by all the drivers.

state-diagram.png

The state of the frontseat consists of two parallel state charts (command and data):

The state transitions for the iFrontSeat interface states are (using the names as defined in the enumerations in moos/protobuf/frontseat.proto)

From To Action
Start INTERFACE_STANDBY Configuration Read
INTERFACE_STANDBY INTERFACE_LISTEN frontseat_providing_data == true
INTERFACE_LISTEN INTERFACE_COMMAND FRONTSEAT_ACCEPTING_COMMANDS && HELM_DRIVE
INTERFACE_COMMAND INTERFACE_LISTEN (FRONTSEAT_IN_CONTROL || FRONTSEAT_IDLE) && HELM_DRIVE
INTERFACE_COMMAND INTERFACE_HELM_ERROR HELM_NOT_RUNNING || HELM_PARK
INTERFACE_LISTEN || INTERFACE_COMMAND INTERFACE_HELM_ERROR HELM_PARK || if (helm_enabled) HELM_NOT_RUNNING (after timeout)
INTERFACE_LISTEN || INTERFACE_COMMAND INTERFACE_FS_ERROR FRONTSEAT_NOT_CONNECTED || frontseat_providing_data == false
INTERFACE_STANDBY INTERFACE_FS_ERROR FRONTSEAT_NOT_CONNECTED (after timeout)
INTERFACE_HELM_ERROR INTERFACE_STANDBY HELM_DRIVE
INTERFACE_FRONTSEAT_ERROR INTERFACE_STANDBY (if(ERROR_FRONTSEAT_NOT_CONNECTED) !FRONTSEAT_NOT_CONNECTED) || (if(ERROR_FRONTSEAT_NOT_PROVIDING_DATA) frontseat_providing_data == true)

Example "ABC" driver

We will show you how to a write a new driver by example. To do so, we have created a simple frontseat simulator ("abc_frontseat_simulator") that is intended to represent the real vehicle frontseat control system. The full source code for this example is given at: