The GoToDepth Behavior
Maintained by: mikerb@mit.edu Get PDF
src: project-pavlab/bhvdocs/bhv_goto_depth
1 The GoToDepth Behavior
1.1 Configuration Parameters
1.2 A Detailed Discussion of GoToDepth Behavior Parameters
1.2.1 The capture_flag Parameter
1.2.2 The capture_delta Parameter
1.2.3 The depth Parameter
1.2.4 The repeat Parameter
1.2.5 The perpetual Parameter
1 The GoToDepth Behavior
This behavior will drive the vehicle to a sequence of specified depths and duration at each depth. This behavior merely expresses a preference for a particular depth. If other behaviors also have a depth preference, coordination/compromise will take place through the multi-objective optimization process. A log of vehicle depth similar to figure below may result.
Figure 1.1: Depth log from simulation with the depth parameters shown in Listing 1.3. The lighter, step-like line indicates the values of DESIRED_DEPTH generated by the helm, and the darker line indicates the recorded depth value of the vehicle. The depth plateaus start from the moment the vehicle achieves depth. For example, the vehicle achieved a depth of 45 meters at 119 seconds and retained that desired depth for another 60 seconds as requested in the configuration shown in Listing 1.3.
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 for the GoToDepth Behavior.
Parameter | Description |
capture_delta | The delta depth, in meters, between the current observed depth and the current target depth, below which the behavior will declare the depth to have been achieved. The default value is 1 meter. Section 1.2.2. |
capture_flag | The name of a MOOS variable incremented each time a target depth level has been achieved. Section 1.2.1. |
depth | A colon-separated list of comma-separated pairs. Each pair contains a desired depth and a duration at that depth. Section 1.2.3. |
repeat | The number of times the vehicle will traverse through the evolution of depths. Section 1.2.4. |
Listing 1.3 - Example Configuration Block.
Behavior = BHV_GoToDepth { // General Behavior Parameters // --------------------------- name = gotodepth // example pwt = 100 // default condition = MODE==Alpha // example updates = GOTO_DEPTH_UPDATES // example // Parameters specific to this behavior // ------------------------------------ capture_delta = 1 // default (meters) capture_flag = DEPTH_ACHIEVED // example depth = 40,60:30,45:20,45 // example repeat = 0 // default }
1.2 A Detailed Discussion of GoToDepth Behavior Parameters [top]
1.2.1 The capture_flag Parameter [top]
This parameter names a MOOS variable incremented each time a target depth level has been achieved. It may be useful for logfile analysis and also allows other behaviors to be conditioned on a depth event. If this behavior is completed in perpetual mode, the counter is reset to zero. If the behavior is repeating a set of depths by setting repeat greater than zero, the counter will continue to increment through evolutions. The default value is the empty string, meaning nothing will be posted. Note the named MOOS variable will automatically have the prefix "GTD_" applied.
1.2.2 The capture_delta Parameter [top]
When the GoToDepth behavior is running and actively influencing the depth of the vehicle to a target depth level, it monitors the discrepancy between the obvserved depth and the current target depth. The capture_delta parameter is the delta depth, in meters, below which the behavior will declare the depth to have been achieved. The default value is 1 meter.
As an example, consider a target depth of say 100 meters, and a capture_delta of 5. When a diving vehicle reaches 95 meters, it will consider the depth achieved. However, it will continue to influence the vehicle to a depth of 100 meters for as a long as prescribed by the depth setting. The "achieving" of the depth results in two things: (a) the duration clock for time spent at that depth will begin, and (b) if there is a capture_flag set, this flag will be posted by the helm to the MOOSDB.
1.2.3 The depth Parameter [top]
The depth parameter is a colon-separated list of comma-separated pairs. Each pair contains a desired depth and a duration at that depth. The duration applies from the point in time that the depth is first achieved. If a time duration is not provided for any pair, it defaults to zero. Thus depth=20 is a valid parameter setting.
The duration is specified in seconds and reflects the time at depth after the vehicle has first achieved that depth, where achieving depth is defined by the capture_delta parameter. The behavior subscribes for NAV_DEPTH to examine the current vehicle depth against the target depth. If the current depth is within the delta given by capture_delta, that depth is considered to have been achieved. The behavior also stores the previous depth from the prior behavior iteration, and if the target depth is between the prior depth and current depth, the depth is considered to be achieved regardless of whether the prior or current depth is actually within the capture_delta.
1.2.4 The repeat Parameter [top]
The number of times the vehicle will traverse through the evolution of depths, proceeding to the 1st depth after the nth depth has been hit. The default value is zero.
1.2.5 The perpetual Parameter [top]
The perpetual parameter is defined at the superclass level, but it's worth discussing its function here. If equal to true, when the vehicle completes its evolution of depths (perhaps several evolutions if repeat is non-zero), the endflags will be posted. But rather than setting the complete variable to true and thus never receiving any further run consideration, the behavior is reset to its initial state. Presumably the user sets endflags that will cause the condition flags to be not immediately satisfied, thus putting the behavior in a state waiting again for an external event flag to be posted. The default value of this parameter is false.
Document Maintained by: mikerb@mit.edu
Page built from LaTeX source using texwiki, developed at MIT. Errata to issues@moos-ivp.org. Get PDF