Back to catalog

Depth Behavior

H01 Constant Depth Motion

Moving correctness tests for BHV_ConstantDepth. These cases verify held depths, surfacing, negative-depth clipping, shape parameters, runtime updates, malformed update preservation, finite-duration completion, malformed config, missing inputs/domain, and disabled depth-control authority.

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_ConstantDepth owns the vertical-control 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 held-depth behavior clearly. The visuals call out the evidence that makes each case pass.

Held Depth

Description: Commands the baseline 12-meter depth with peakwidth=4, basewidth=10, and summitdelta=15. Passes after the eastbound transit reaches x>=45 with 10<=NAV_DEPTH<=14, DEPTH_MISMATCH<=4, the expected corridor and heading, and no behavior error.

Runtime Update

Description: Posts DEPTH_VALUE="depth=18" at 10 seconds to change the active target from 12 to 18 meters. Passes after x>=55 with 15.5<=NAV_DEPTH<=20, DEPTH_MISMATCH<=4, the expected corridor and heading, and no behavior error.

Case Matrix

All cases

constant_depth_hold_pass

Commands the baseline 12-meter depth with peakwidth=4, basewidth=10, and summitdelta=15. Passes after the eastbound transit reaches x>=45 with 10<=NAV_DEPTH<=14, DEPTH_MISMATCH<=4, the expected corridor and heading, and no behavior error.

constant_depth_surface_pass

Commands the valid lower boundary depth=0 with a one-meter peak width and four-meter base width. Passes after x>=40 with NAV_DEPTH<=2, DEPTH_MISMATCH<=2, and no behavior error.

constant_depth_negative_clip_pass

Configures depth=-5 to test clamping a negative target to the surface. Passes after x>=40 with NAV_DEPTH<=2, DEPTH_MISMATCH<=2, and no behavior error.

constant_depth_no_mismatch_var_pass

Omits the optional depth_mismatch_var while retaining the baseline 12-meter target. Passes after x>=45 with 10<=NAV_DEPTH<=14, the expected transit corridor, and no behavior error.

constant_depth_update_pass

Posts DEPTH_VALUE="depth=18" at 10 seconds to change the active target from 12 to 18 meters. Passes after x>=55 with 15.5<=NAV_DEPTH<=20, DEPTH_MISMATCH<=4, the expected corridor and heading, and no behavior error.

constant_depth_bad_update_preserve_pass

Posts the valid 18-meter update at 10 seconds and malformed depth=bad mail at 22 seconds to test preservation of the last valid target. Passes after x>=55 with 16<=NAV_DEPTH<=20, DEPTH_MISMATCH<=4, the expected corridor and heading, and no behavior error.

constant_depth_duration_complete_pass

Sets duration=8 and endflag=CD_DONE=true, with an identical low-priority depth guard keeping the depth decision variable covered after the finite behavior ends. Passes at 22 seconds only when CD_DONE=true, NAV_X>=20, and no behavior error occurred.

constant_depth_bad_depth_fail

Sets depth=deep to exercise rejection of a nonnumeric depth. The harness passes when IVPHELM_STATE reports HELM_MALCONFIG.

constant_depth_bad_peakwidth_fail

Sets peakwidth=wide to exercise rejection of a nonnumeric peak width. The harness passes when IVPHELM_STATE reports HELM_MALCONFIG.

constant_depth_bad_basewidth_fail

Sets basewidth=wide to exercise rejection of a nonnumeric base width. The harness passes when IVPHELM_STATE reports HELM_MALCONFIG.

constant_depth_bad_summitdelta_fail

Sets summitdelta=wide to exercise rejection of a nonnumeric summit delta. The harness passes when IVPHELM_STATE reports HELM_MALCONFIG.

constant_depth_bad_mismatch_var_fail

Sets depth_mismatch_var=BAD VAR to exercise rejection of a MOOS variable name containing whitespace. The harness passes when IVPHELM_STATE reports HELM_MALCONFIG.

constant_depth_missing_duration_fail

Omits the required duration parameter from BHV_ConstantDepth. The harness passes when ABE_BHV_ERROR is observed.

constant_depth_missing_nav_depth_fail

Changes the simulator output prefix to SIM, leaving the helm without NAV_X or NAV_DEPTH. The harness passes at 45 seconds when both navigation variables remain absent, DESIRED_ELEVATOR=0, and no behavior error is observed.

constant_depth_domain_missing_fail

Removes depth from the IvP helm domain while retaining the constant-depth behavior. The harness passes when ABE_BHV_ERROR is observed.

constant_depth_low_elevator_authority_fail

Commands 24 meters while limiting pMarinePIDV22 to maxelevator=0.05. Passes after x>=45 only when depth remains at or above two meters short of the target and the commanded elevator is near either saturation rail (0.045<=|DESIRED_ELEVATOR|<=0.05), with no behavior error; reaching NAV_DEPTH>=22.5 fails the case.

constant_depth_control_disabled_fail

Commands 16 meters with depth_control=false in pMarinePIDV22. The harness passes after x>=45 when NAV_DEPTH<=2, DEPTH_MISMATCH>=14, and no behavior error is observed; reaching NAV_DEPTH>=14 fails the case.

Source links

Harness README Mission README