Back to catalog

Depth Behavior

H04 Max Depth Motion

Moving correctness tests for BHV_MaxDepth. These cases verify max-depth guarding, zero-depth clamps, negative command clipping, tight and zero tolerances, unconstrained shallow commands, invalid configuration, unsupported ascent-field config, missing depth inputs, and missing depth domain support.

Stem Mission

Baseline scenario context

The shared depth stem mission runs one simulated UUV and one shoreside evaluation community. The vehicle uses pHelmIvP, pMarinePIDV22, and uSimMarineV22; the horizontal waypoint keeps the vehicle underway while BHV_MaxDepth owns the over-depth guard verdict.

Examples

Representative runs

These depth GIFs are generated from real run alogs, not raw pMarineViewer screen captures, because the top-down track alone does not show max-depth guard pressure clearly. The visuals call out the evidence that makes each case pass.

Max Depth Guard

Description: Opposes a 30-meter constant-depth command with max_depth=12,tolerance=4, testing that the higher-priority max-depth objective stops the dive; passes at x>=80 when NAV_DEPTH<=16, DEPTH_SLACK>=-4, and no behavior error is observed.

Unconstrained Shallow

Description: Commands eight meters while setting max_depth=20, testing that the one-sided constraint does not pull an already-shallow target toward its boundary; passes at x>=80 when 6<=NAV_DEPTH<=10, DEPTH_SLACK>=8, and no behavior error is observed.

Case Matrix

All cases

max_depth_guard_pass

Opposes a 30-meter constant-depth command with max_depth=12,tolerance=4, testing that the higher-priority max-depth objective stops the dive; passes at x>=80 when NAV_DEPTH<=16, DEPTH_SLACK>=-4, and no behavior error is observed.

max_depth_zero_guard_pass

Opposes a 20-meter command with max_depth=0,tolerance=2, testing that a guard at the domain minimum can hold the vehicle at the surface; passes at x>=80 when NAV_DEPTH<=2, DEPTH_SLACK>=-2, and no behavior error is observed.

max_depth_negative_clip_pass

Configures max_depth=-5 against a 20-meter command, testing that the negative boundary is accepted and clipped to zero; passes at x>=80 when NAV_DEPTH<=2, DEPTH_SLACK>=-2, and no behavior error is observed.

max_depth_basewidth_alias_pass

Uses nondefault basewidth=1 against a 30-meter command, testing that the alias creates a narrow max-depth guard rather than retaining the 100-meter default; passes at x>=80 when NAV_DEPTH<=13.25, DEPTH_SLACK>=-1.25, and no behavior error is observed.

max_depth_no_slack_var_pass

Omits the optional depth_slack_var from the ordinary 12-meter guard, testing that telemetry configuration is not required to build and apply the constraint; passes at x>=80 when NAV_DEPTH<=16 and no behavior error is observed.

max_depth_unconstrained_shallow_pass

Commands eight meters while setting max_depth=20, testing that the one-sided constraint does not pull an already-shallow target toward its boundary; passes at x>=80 when 6<=NAV_DEPTH<=10, DEPTH_SLACK>=8, and no behavior error is observed.

max_depth_bad_config_fail

Sets max_depth=deep, testing rejection of a nonnumeric guard depth; passes only when the helm reports the exact state IVPHELM_STATE=MALCONFIG before the 12-second missing-state deadline.

max_depth_bad_tolerance_fail

Sets tolerance=wide, testing rejection of a nonnumeric tolerance; passes only when the helm reports the exact state IVPHELM_STATE=MALCONFIG before the 12-second missing-state deadline.

max_depth_bad_basewidth_fail

Sets basewidth=wide, testing rejection of a nonnumeric alias value; passes only when the helm reports the exact state IVPHELM_STATE=MALCONFIG before the 12-second missing-state deadline.

max_depth_bad_slack_var_fail

Sets depth_slack_var=BAD VAR, testing rejection of a MOOS variable name containing whitespace; passes only when the helm reports the exact state IVPHELM_STATE=MALCONFIG before the 12-second missing-state deadline.

max_depth_bad_ascent_field_fail

Adds unsupported ascent_speed and ascent_grade fields to an otherwise valid guard, testing that unimplemented configuration is rejected rather than ignored; passes only when the helm reports the exact state IVPHELM_STATE=MALCONFIG before the 20-second missing-state deadline.

max_depth_missing_nav_depth_fail

Changes the simulator prefix to SIM, withholding NAV_X and NAV_DEPTH from the helm; passes at the 45-second absence deadline when navigation and depth-mismatch mail remain absent, DESIRED_ELEVATOR=0, and no behavior error is observed.

max_depth_domain_missing_fail

Removes depth from the helm domain while retaining BHV_MaxDepth, testing its explicit missing-domain error path; passes when ABE_BHV_ERROR is observed.

Source links

Harness README Mission README