Skip to content

Command Line Interface (CLI) Description

The Ocean Imaging CLI provides access to user variables and functions. User variables map into variables within the control system and the CLI allows the values of these variables to be viewed or modified. User functions differ from variables in that they perform a specific action within the control system rather than just viewing or modifying a value. Along with user variables and functions the CLI also supports commnads for viewing and searching the available user variables and functions. The CLI also supports tab completion and history using the up and down arrow keys.


Internal commands

Internal commands are built in to the CLI command processor and are useful for searching for a variable or function you want to access.

  • help - display a help menu with the commands listed below followed by a brief description.

  • log msg - publish the "msg" string to LCM

  • list [type] - list the variables and functions followed by a brief description. If the list command is entered without the optional type argument, everything is returned. The optional type arguments accepted by the list command are (bool, long, double, func). If the type argument is included, only the type of variable or function will be displayed with a brief description.

#
# list bool
#
# UI_BOOL ####################################################
# isControlEnabled: control loop enable flag
# xEffortEnabled: xEffort enable flag
# yEffortEnabled: yEffort enable flag
# zEffortEnabled: zEffort enable flag
# psiEffortEnabled: psiEffort enable flag
# rangeAssistEnabled: enable range assist
# tlPositionEnabled: enable track line position loop
#


  • glist arg - grep the variable and function list for a specific sub-string. This is useful for finding all the variables and functions related to a specific control system aspect. Below is an example of a list of all the variables and functions containing the sub-string "psi".
#
# glist psi
#
# UI_BOOL ####################################################
# psiEffortEnabled: psiEffort enable flag
#
# UI_LONG ####################################################
#
# UI_DOUBLE ##################################################
# psiTestCmd: psi effort of MBARI_TEST_CMD
#
# [ psi_gains ]: ---------------------------------------------
# psiKp: psi Kp gain
# psiKi: psi Ki gain
# psiKd: psi Kd gain
#
# UI_FUNC ####################################################
#
# [ psi_commands ]: ------------------------------------------
# psiMoveRel: relative psi move (deg)
# psiMoveAbs: absolute psi move (deg, dir)
# psiStepCmd: psi step cmd (deg)
# psiSlewRate: slew rate (deg/sec)
# psiGetCmd: return the cmd (deg)
# psiGetGoal: return the goal (deg)
# psiEffortTau: tau for psiEffortFilter
# psiEffortMaxRate: max_rate for psiEffortFilter
#


  • blist - list bool variables

  • llist - list long variables

  • dlist - list double variables

  • flist - list user functions

  • param - show the value of all user variables

  • gparam arg - similiar to param except only variables with the specific sub-string will be displayed. Below is an example of all the variable values with the sub-string "range" being displayed.

#
# gparam range
#
# UI_BOOL ####################################################
# rangeAssistEnabled = true
#
# UI_LONG ####################################################
# rangeSrc = 2
#
# UI_DOUBLE ##################################################
# rangeLimit = 1.500000
# rangeTestCmd = 0.000000
# rangeKp = 100.000000
# rangeKi = 2.000000
# rangeKd = 200.000000
#


  • bparam - show value of bool variables

  • lparam - show value of long variables

  • dparam - show value of double variables


User variables and functions

Entering the name of a variable in the CLI without arguments will return the variables current value.

#
# xtrackKp
# xtrackKp = 50.000000
#

To change the value of a control system variable enter the name of the variable followed by the assignment operator "=" and the desired value. If the value is accepted by the control system the variable name followed by the updated value will be displayed.

#
# xtrackKp = 42
# xtrackKp = 42.000000
#

To call a user function enter the name of the user function. The control system will return a status message after the funtion is executed.

#
# enable
# INFO: enable control loops
#

Some user functions can accept arguments. The syntax for passing arguments to a user function is a set of parenthesis around the argument.

#
# psiMoveRel(20)
# INFO: psiTraj.move_rel( 20 )
#

Script commands

The following is a list of commands used to issue script commands directly, load and start scripts, and monitor their status. Script command are interpereted locally in the CLI interface and sent to the way-point processor or sent to the control system as a set of control system functions.

script processing and status

  • loadScript script - load a script
  • startScript - start a script
  • stopScript - stop a script
  • resetScript line - reset script to line
  • clearScript - clear script from memory
  • showScript - display the script
  • scriptStatus - current script status

script commands

Below are script commands that can be executed from the CLI. Script commands deal with coordinates in the North, East, Down (NED) coordinate system relative to the Survey Coordinate System origin.

  • pos x, y - move to (x,y) NED coord
  • hdg deg, dir - heading (-1 port, +1 stbd)
  • alt range - move to range in meters
  • rbm r, b - move r meters at bearing of b deg

miscellaneous commands

  • getPos - display position in NED coordinates relative to the survey origin
  • calcBearing x, y - calc bearing in NED coordinates to (x, y)

Survey Start Check List

  • enable control

  • set the survey origin and heading

  • set tangent plane time constant settings

  • 0.75 for flat terrain
  • 1.25 for aggressive terrain
#
# SurveyHeading()
#
# TangentPlaneTimeConstant(0.75)
#


  • verify that your position, range and heading match the start of the script
#
# pos 0,0
#
# alt 3
#
# hdg 0,1
#
# getPos
#
# rangeGetCmd
#
# psiGetCmd
#

Pass through functions

Below are functions used to pass information through the control system to other OI processes.

Strobe Tilter functions

The following functions are used to control the strobe tilter processes.

  • tilterTestMux: 1 = vp angle, 2 = double_t val, 3 = js_follow, 4 = js_knudge
  • tilterTestAngle: double_t angle (deg)

  • tilterPortMux: 1 = vp angle, 2 = double_t val, 3 = js_follow, 4 = js_knudge

  • tilterPortAngle: double_t angle (deg)

  • tilterStbdMux: 1 = vp angle, 2 = double_t val, 3 = js_follow, 4 = js_knudge

  • tilterStbdAngle: double_t angle (deg)

Surface Pose functions

The following functions pass arguments through to the surface pose localization process.

  • csBearing: set survey bearing
  • SurveyHeading: set survey bearing and origin
  • SurveyOriginLat: set survey latitude
  • SurveyOriginLon: set survey longitude
  • SurveyOriginUpdate: update survey origin
  • TangentPlaneTimeConstant: filter time constant in sec (0.0 to disable)
  • FakeBottomDepth: test mode (-1.0 to disable)
  • TargetPitchTimeConstant: filter time constant in sec (0.0 to disable)

Control System functions

Below is a list of the most commonly used control system functions. All control loops are closed in the Survey Coordinate System. For details on all available functions use the 'list' command from the CLI.

Global control system functions

  • stop: stop in current measured position
  • pause: pause all trajectory generators
  • enable: enable control loops
  • disable: disable control loops
  • clear: set all test commands to zero

Heading functions

  • psiMoveRel: relative psi move (deg)
  • psiMoveAbs: absolute psi move (deg, dir) [-1 port, +1 stbd]
  • psiStepCmd: psi step cmd (deg)
  • psiSlewRate: slew rate (deg/sec)
  • psiGetCmd: return the cmd (deg)
  • psiGetGoal: return the goal (deg)

Trackline (AKA tangent) functions

  • tlMoveRel: relative track-line move (meters)
  • tlMoveAbs: absolute track-line move (meters)
  • tlSlewRate: slew rate (meters/sec)
  • tlGetCmd: return the cmd (meters)
  • tlGetGoal: return the goal (meters)

Cross-track functions

  • xtrackMoveRel: relative xtrack move (meters)
  • xtrackMoveAbs: absolute xtrack move (meters)
  • xtrackStepCmd: xtrack step command (meters)
  • xtrackSlewRate: slew rate (meters/sec)
  • xtrackGetCmd: return the cmd (meters)
  • xtrackGetGoal: return the goal (meters)

Range (AKA normal) functions

  • rangeMoveRel: relative range move (meters)
  • rangeMoveAbs: absolute range move (meters)
  • rangeStepCmd: range step command (meters)
  • rangeSlewRate: slew rate (meters/sec)
  • rangeGetCmd: return the cmd (meters)
  • rangeGetGoal: return the goal (meters)