The Trail Behavior


Maintained by: mikerb@mit.edu         Get PDF


src: project-pavlab/bhvdocs/bhv_trail


1  The Trail Behavior
     1.1 Configuration Parameters
     1.2 Variables Published
     1.3 Parameters

1   The Trail Behavior


This behavior will drive the vehicle to trail or follow another specified vehicle at a given relative position. A tool for "formation flying". The following parameters are defined for this behavior:

Figure 1.1: Interpolation of vehicle speed inside the radius set by nm_radius relative to the extrapolated trail position.

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 Trail Behavior.

ParameterDescription
nm_radius:If in this range to contact and ahead of it, slow down. The default is 20 meters.
no_alert_request:If true, no request will be made to the contact manager for contact alerts. The default is true.
post_trail_dist_on_idle:If true, post TRAIL_DISTANCE even during the idle state. The default is true.
pwt_outer_dist:Range to contact outside which the behavior has zero priority.
radius:If outside this radius to the contact, head to nm_radius ahead of trail point. The default is 5 meters.
trail_angle:Relative angle to the contact to set the trail-point. The default is 180.
trail_angle_type:Either "relative" or "absolute" bearing/angle to the contact. The default is relative.
trail_range:Relative distance to the contact to set the trail-point. The default is 50 meters.

Listing 1.4 - Example Configuration Block.

 Behavior = BHV_Trail
 {
   // General Behavior Parameters
   // ---------------------------
   name         = trail_                // example
   pwt          = 100                   // default
   condition    = TRAIL_ALLOWED = true  // example
   updates      = TRAIL_INFO            // example
   templating   = spawn                 // example


   // General Contact Behavior Parameters
   // -----------------------------------
             contact = to-be-set        // 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
   // ------------------------------------
                 nm_radius = 20         // default (meters)
          no_alert_request = false      // default
   post_trail_dist_on_idle = true       // default
            pwt_outer_dist = 0          // default (meters)        
                    radius = 5          // default (meters) 
               trail_angle = 180        // default (degrees)
          trail_angle_type = relative   // default (or absolute)             
               trail_range = 50         // default (meters)
 }

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 Trail Behavior.

VariableDescription
PURSUIT:1 if in behavior is active and producing an objective function, 0 otherwise.
REGION: 
TRAIL_HEADING: 
TRAIL_SPEED: 
TRAIL_RANGE: 
MAX_RANGE: 
VIEW_POINT: 
TRAIL_DISTANCE: 

1.3   Parameters    [top]


  • trail_range: The range component of the relative position to the contact to trail.
  • trail_angle: The relative angle of the relative position to the contact to trail. (180 is directly behind, 90 is a parallel track to the contacts starboard side, -90 is on the port side of the contact.)
  • trail_angle_type: The trail angle may be set to either relative (the default), or absolute.
  • radius: The distance (in meters) from the trail position that will result in the behavior ``cutting range to the trail position, and inside of which will result in the behavior ``shadowing the contact. The default is 5 meters.
  • nm_radius: The distance in meters from the trail point within which the speed will be gradually change from the outer chase speed (max speed) and the speed of the contact, as illustrated in Figure 1.1. This parameter should typically be set to several times the value of radius to achieve smooth formation flying. Default is 20 meters.
  • max_range: The distance (in meters) that the contact must be within for the behavior to be active and produce an objective function. The default is max_range value is zero meaning it will be active regardless of the distance to the contact.

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