19   The MemoryTurnLimit Behavior


19.1 Configuration Parameters
19.2 Calculation of the Heading History
19.3 Variables Published
19.4 The MemoryTurnLimit Objective Function


The objective of the Memory-Turn-Limit behavior is to avoid vehicle turns that may cross back on its own path and risk damage to the towed equipment. Its configuration is determined by the two parameters described below which combine to set a vehicle turn radius limit. However, it is not strictly described by a limited turn radius; it stores a time-stamped history of recent recorded headings and maintains a heading average, and forms its objective function on a range deviation from that average. This behavior merely expresses a preference for a particular heading. If other behaviors also have a heading preference, coordination/compromise will take place through the multi-objective optimization process. The following parameters are defined for this behavior:

19.1   Configuration Parameters    [top]


Listing 19.1 - Configuration Parameters Common to All Behaviors.

activeflag:A MOOS variable-value pair posted when the behavior is in the active state. Section 6.5.4.
condition:Specifies a condition that must be met for the behavior to be running. Section 6.5.1.
duration:Time in behavior will remain running before declaring completion. Section 7.2.6.
duration_idle_decay:When true, duration clock is running even when in the idle state. Section 7.2.6.
duration_reset:A variable-pair such as MY_RESET=true, that will trigger a duration reset. See Section 7.2.6.
duration_status:The name of a MOOS variable to which the vehicle duration status is published. Section 7.2.6.
endflag:A MOOS variable-value pair posted when the behavior has completed. Section 6.5.4.
idleflag:A MOOS variable-value pair posted when the behavior is in the idle state. Section 6.5.4.
inactiveflag:A MOOS variable-value posted when the behavior is not in the active state. Section 6.5.4.
name:The (unique) name of the behavior. Section 7.2.2.
nostarve:Allows a behavior to assert a maximum staleness for a MOOS variable Section 7.2.9.
perpetual:If true allows the behavior to to run even after it has completed. Section 7.2.7.
post_mapping:Re-direct behavior output normally to one MOOS variable to another instead. Section 7.2.4.
priority:The priority weight of the behavior. Section 7.2.3.
pwt:Same as priority.
runflag:A MOOS variable and a value posted when a behavior has met its conditions. Section 6.5.4.
spawnflag:A MOOS variable and a value posted when a behavior is spawned. Section 6.5.4.
templating:Turns a behavior into a template for spawning behaviors dynamically. Section 7.7.
updates:A MOOS variable from which behavior parameter updates are read dynamically. Section 7.2.5.

Listing 19.2 - Configuration Parameters for the MemoryTurnLimit Behavior.

ParameterDescription
memory_time:The duration of time for which the heading history is maintained and heading average calculated. The default value is -1, indicating that the parameter is un-set. In this case the behavior will not produce an objective function.
turn_range:The range of heading valuesdeviating from the current heading average outside of which the behavior reflects sharp penalty in its objective function. The default value is -1, indicating that the parameter is un-set. In this case the behavior will not produce an objective function.

Listing 19.3 - Example Configuration Block.

 Behavior = BHV_MemoryTurnLimit
 {
   // General Behavior Parameters
   // ---------------------------
   name         = mem_turn_limit       // default
   pwt          = 100                  // default
   condition    = MODE=TRANSITING      // example
   condition    = ARRAY=connected      // example
   updates      = MEM_TURN_UPDATES     // example

   // Parameters specific to this behavior
   // ------------------------------------
          memory_time = 60             // example (seconds)
           turn_range = 30             // example (degrees)
 }

19.2   Calculation of the Heading History    [top]


The heading history is maintained locally in the behavior by storing the currently observed heading and keeping a queue of n recent headings within the memory_time threshold. The heading average calculation below handles the issue of angle wrap in a set of n headings where each heading is in the range [0,359].

where s and c are given by:

The vehicle turn radius r is not explicitly a parameter of the behavior, but is given by:

where v is the vehicle speed and u is the turn rate given by:

The same turn radius is possible with different pairs of values for turn_range and memory_time. However, larger values of turn_range allow sharper initial turns but temper the turn rate after the initial sharper turn has been achieved.

19.3   Variables Published    [top]


The only variable published by this behavior is MEM_TURN_AVG which indicates the present heading average, rounded to the nearest integer.

19.4   The MemoryTurnLimit Objective Function    [top]


A Rendering of the MemoryTurnLimit Objective Function

Figure 19.1: The MemoryTurnLimit objective function: The objective function produced by the MemoryTurnLimit behavior is defined over possible heading values. Depicted here is an objective function formed when the recent heading history is 225 degrees and the turn_range parameter is set to 30 degrees. The resulting objective function highly favors headings in the range of 190-240 degrees. One the right is a "birds-eye" view of the function, and on the right the function is viewed at an angle to appreciate the 3D quality of the function. Higher (red) values correspond to higher utility.


Page built from LaTeX source using the texwiki program.