The Shadow Behavior


Maintained by: mikerb@mit.edu         Get PDF


src: project-pavlab/bhvdocs/bhv_periodic_surface


1  The Shadow Behavior
     1.1 Configuration Parameters
     1.2 Variables Published

1   The Shadow Behavior


This behavior will drive the vehicle to match the trajectory of another specified vehicle. This behavior in conjunction with the BHV_CutRange behavior can produce a "track and trail" capability.

1.1   Configuration Parameters    [top]


Listing 1.1 - Configuration Parameters Common to All Behaviors.

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

Listing 1.2 - Configuration Parameters Common to Contact Behaviors.

ParameterDescription
bearing_linesIf true, a visual artifict will be produced for rendering the bearing line between ownship and the contact when the behavior is running. Not all behaviors implement this feature.
contactName or unique identifier of a contact to be avoided.
decayTime interval during which extrapolated position slows to a halt.
exit_on_filter_groupIf true, and if an exclusion filter is implemented for this contact behavior, an early exit of the behavior may be allowed when or if the group name changes and no longer satisfies the exclusion filter. The default is false.
exit_on_filter_vtypeIf true, and if an exclusion filter is implemented for this contact behavior, an early exit of the behavior may be allowed when or if the vehicle type changes and no longer satisfies the exclusion filter. The default is false.
exit_on_filter_regionIt true, and if an exclusion filter is implemented for this contact behavior, an early exit of the behavior may be allowed when or if the contact moves into a region that would no longer satisfy the exclusion filter. The default it false.
extrapolateIf true, contact position is extrapolated from last position and trajectory.
ignore_group:If specified, the contact group may not match the given ignore group. If multiple ignore groups are specified, the contact group must be different than all ignore groups. Introduced after Release 19.8.1. Section ???
ignore_name:If specified, the contact name may not match the given ignore name. If multiple ignore names are specified, the contact name must be different than all ignore names. Introduced after Release 19.8.1. Section ???
ignore_region:If specified, the contact group may be in the given ignore region. If multiple ignore regions are specified, the contact position must be external to all ignore regions. Introduced after Release 19.8.1. Section ???
ignore_type:If specified, the contact type may not match the given ignore type. If multiple ignore types are specified, the contact type must be different than all ignore types. Introduced after Release 19.8.1. Section ???
match_group:If specified, the contact group must match the given match group. If multiple match groups are specified, the contact group must match at least one match group. Introduced after Release 19.8.1. Section ???
match_name:If specified, the contact name must match the given match name. If multiple match names are specified, the contact name must match at least one. Introduced after Release 19.8.1. Section ???
match_region:If specified, the contact must reside in the given convex region. If multiple match regions are specified, the contact position must be in at least one match region. The multiple regions essentially can together support a non-convex regins. Introduced after Release 19.8.1. Section ???
match_type:If specified, the contact type must match the given match type. If multiple match types are specified, the contact type must match at least one match type. Introduced after Release 19.8.1. Section ???
on_no_contact_okIf false, a helm error is posted if no contact information exists. Applicable in the more rare case that a contact behavior is statically configured for a named contact. The default is true.
strict_ignoreIf true, and if one of the ignore exclusion filter components is enabled, then an exclusion filter will fail if the contact report is missing information related to the filter. For example if the contact group information is unknown. The default is true.
time_on_legThe time on leg, in seconds, used for calculating closest point of approach.

Listing 1.3 - Configuration Parameters for the Shadow Behavior.

ParameterDescription
heading_peakwidth:Width of the peak, in degrees, in the produced ZAIC-style IvP function.
heading_basewidth:Width of the base, in degrees, in the produced ZAIC-style IvP function.
speed_peakwidth:Width of the peak, in m/sec, in the produced ZAIC-style function.
speed_basewidth:Width of the base, in m/sec, in the produced ZAIC-style IvP function.

Listing 1.4 - Example Configuration Block.

 Behavior = BHV_CutRange
 {
   // General Behavior Parameters
   // ---------------------------
   name         = shadow_henry          // example
   pwt          = 200                   // example
   condition    = SHADOW = true         // example
   updates      = CONTACT_INFO          // example


   // General Contact Behavior Parameters
   // -----------------------------------
             contact = henry            // example
               decay = 15,30            // default (seconds)
         extrapolate = true             // default
    on_no_contact_ok = true             // default
         time_on_leg = 60               // default (seconds)


   // Parameters specific to this behavior
   // ------------------------------------
         pwt_outer_dist = 0             // default (meters)
      heading_peakwidth = 20            // default 
      heading_basewidth = 160           // default 
        speed_peakwidth = 0.1           // default 
        speed_basewidth = 2.0           // default 
 }
  • pwt_outer_dist: The distance (in meters) that the contact must be within for the behavior to be active and produce an objective function. The default is zero meaning it will be active regardless of the distance to the contact.
  • heading_peakwidth: This behavior uses the ZAIC_PEAK tool from the IvP Toolbox for generating an objective function over heading and speed. This parameter sets the peakwidth parameter of the heading component.
  • heading_basewidth: This behavior uses the ZAIC_PEAK tool from the IvP Toolbox for generating an objective function over heading and speed. This parameter sets the basewidth parameter of the heading component.
  • speed_peakwidth: This behavior uses the ZAIC_PEAK tool from the IvP Toolbox for generating an objective function over heading and speed. This parameter sets the peakwidth parameter of the speed component.
  • speed_basewidth: This behavior uses the ZAIC_PEAK tool from the IvP Toolbox for generating an objective function over heading and speed. This parameter sets the basewidth parameter of the speed component.

1.2   Variables Published    [top]


The below MOOS variables will be published by the behavior during normal operation, in addition to any configured flags. A variable published by any behavior may be supressed or changed to a different variable name using the post_mapping configuration parameter described in Section ???.

Listing 1.5 - Variables Published by the Shadow Behavior.

VariableDescription
SHADOW_CONTACT_X:description
SHADOW_CONTACT_Y:description
SHADOW_CONTACT_SPEED:description
SHADOW_CONTACT_HEADING:description
SHADOW_CONTACT_RELEVANCE:description

Document Maintained by: mikerb@mit.edu        
Page built from LaTeX source using texwiki, developed at MIT. Errata to issues@moos-ivp.org. Get PDF