The CutRange Behavior


Maintained by: mikerb@mit.edu         Get PDF


src: project-pavlab/bhvdocs/bhv_cutrange


1  The CutRange Behavior
     1.1 The Patience Parameter
     1.2 Automatic Priority Weight Variation Based on Range
     1.3 Initiating and Abandoning Pursuit
     1.4 Configuration Parameters
     1.5 Variables Published

1   The CutRange Behavior


The CutRange behavior will drive ownship to reduce the range between itself and another specified vehicle (nearly the opposite of the BHV_AvoidCollision behavior).

1.1   The Patience Parameter    [top]


The behavior reasons about candidate ownship maneuvers and will use a combination of immediate-rate-of-closure (IROC) and expected closest point of approach (CPA) distance, to evaluate candidate maneuvers. Using solely IROC is regarded as having zero patience, and using solely CPA is regarded as having maximal patience. The idea is conveyed in Figure 1.1 below. The former method may be preferred for a contact with frequent heading changes, while the latter may be preferred for contacts on a trajectory that rarely changes.

Figure 1.1: The CutRange behavior will either drive ownship directly toward the current contact position (zero patience setting) or drive ownship to be on the fastest intercept course based on the contact current position, heading and speed (maximal patience setting).

1.2   Automatic Priority Weight Variation Based on Range    [top]


The CutRange behavior may optionally be configured to automatically decrease its priority weight down to zero as it closes range to the contact. This can be used to ensure ownship does not collide with the contact or to transition the helm to a different mode of operation as it closes range to the contact. The idea is shown in Figure 1.2

Figure 1.2: When ownship is at the outer range (pwt_outer_range), the priority is at its maximal value. When ownship is at the inner most range (pwt_inner_range), the priority weight drops to zero. The priority weight decreases linearly as the range is closed. If the overall configured priority weight for the behavior were set to 80 instead of 100, the outer weight would 80, and 40 at the intermediate range.

When the contact is at a range at or beyond pwt_outer_dist, the priority weight will be 100 percent of the behavior's configured priorty weight. When the contact is at or closer than the range given by pwt_inner_dist the priorty weight will be zero. At contact ranges between these two values the priority weight will linearly decrease in value. In the situation depicted in Figure 1.2, the vehicle transistion to a dominant Shadow behavior as the range is closed. When the range decreases to pwt_inner_dist, the Shadow behavior is solely determining ownship heading and speed to match the contact's current heading and speed.

1.3   Initiating and Abandoning Pursuit    [top]


The giveup_dist parameter sets a contact range beyond which the behavior will assign, a zero priority weight, essentially giving up pursuit and becoming an inactive behavior. The parameter is typically set to be a bit higher than the pwt_outer_dist parameter, but any non-zero configured value will be respected. A giveup_dist of zero is the default, and disables this feature.

As ownship range to the contact increases and crosses the giveup_dist threshold, the behavior may be configure to post one or more messages, using the giveupflag parameter. Similarly, when ownship range to contact decreases below the giveup range, the behavior may be configure to post one or more messages, using the pursueflag parameter. For example:

   pursueflag = PURSUIT=true
   giveupflag = PURSUIT=false

In the above case, the two flags could be used to transition the helm out of its present mission mode and back again based on the status of closing range to the contact.

1.4   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 CutRange Behavior.

ParameterDescription
giveup_dist:Range to contact, in meters, outside which the behavior will give up (become inactive). Default is zero. Section 1.3.
giveupflag:Optional MOOS variable-value pairs posted when ownship range to contact increases above giveup_dist. Section 1.3.
patience:Linear scale choice between preferring heading directly to the contact (patience=0) or heading on the lowest closest point of approach (patience=100). Section 1.1.
pursueflag:Optional MOOS variable-value pairs posted when ownship range to contact drops below giveup_dist. Section 1.3.
pwt_outer_dist:Range to contact outside which the behavior has maximum priority. Section 1.2.
pwt_inner_dist:Range to contact within which the behavior has zero priority. Section 1.2.

Listing 1.4 - Example Configuration Block.

 Behavior = BHV_CutRange
 {
   // General Behavior Parameters
   // ---------------------------
   name         = cutrange_                         // example
   pwt          = 200                               // example
   condition    = AVOID = true                      // example
   updates      = CONTACT_INFO                      // example
   endflag      = CONTACT_RESOLVED = $[CONTACT]     // example 
   templating   = spawn                             // example


   // General Contact Behavior Parameters
   // -----------------------------------
       bearing_lines = white:0, green:0.65, yellow:0.8, red:1.0   // example

             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
   // ------------------------------------
         giveup_dist = 225              // Meters. Default is 0, disabled
            patience = 45               // [0,100]. Default 0 
      pwt_inner_dist = 50               // Meters. Default is 0. 
      pwt_outer_dist = 200              // Meters. Default is 0.
          pursueflag = PURSUIT=true
          giveupflag = PURSUIT=false
 }

1.5   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 ???.

  • VIEW_SEGLIST: A bearing line between ownship and the contact if configured for rendering.
  • Any variables involved in the giveupflag or pursueflag configurations, or other general behavior flags.

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