Back to catalog

Behavior Correctness

H01 Avoid-Obstacle Behavior

Behavior correctness tests for BHV_AvoidObstacleV24. These cases isolate the behavior-owned contract for obstacle alert requests, helper flags, lifecycle evidence, resolution signals, and clean transit outcomes.

Stem Mission

Baseline scenario context

The stem mission runs one ownship through deterministic obstacle layouts with obstacle-manager input held stable. The cases focus on what BHV_AvoidObstacleV24 requests, flags, and resolves.

Examples

Representative runs

Default Auto Request

Description: Posts the lane-blocking polygon ob_lane through KNOWN_OBSTACLE, testing the spawned behavior's automatic alert request and one-obstacle lifecycle; passes at 68 seconds when alert-request and obstacle-alert mail have appeared, OBAVOIDING=end, ARRIVED=true, and collisions remain zero.

Sequential Obstacle Alerts

Description: Posts ob_one near (19,-66) at one second and ob_two near (55,-57) at two seconds, lowers transit speed to 1.6, and adds spawnxflag=OBSTACLE_SPAWNED=$[OID], testing two independent spawned avoiders; passes with an alert request, at least two OBSTACLE_ALERT deliveries, final spawn ID ob_two, arrival, and zero collisions.

Avoid Disabled Fail

Description: Changes the spawned behavior condition to AVOID=false while AVOID remains initialized true, testing the no-avoidance outcome after normal request and alert delivery; the harness passes when the vehicle still arrives with exactly one encounter and one collision and OBAVOIDING=end.

Case Matrix

All cases

default_auto_request_pass

Posts the lane-blocking polygon ob_lane through KNOWN_OBSTACLE, testing the spawned behavior's automatic alert request and one-obstacle lifecycle; passes at 68 seconds when alert-request and obstacle-alert mail have appeared, OBAVOIDING=end, ARRIVED=true, and collisions remain zero.

rng_flag_pass

Adds paired <20 range flags that post AVOID_RANGE_SEEN=true and the live $[RNG]; the first publication must carry true with range below 20 meters, and the vehicle must subsequently arrive collision-free.

cpa_flag_pass

Adds paired CPA flags that post AVOID_CPA_SEEN=true and the event's $[CPA]; passes when the source-defined close-then-open CPA event reports true, a minimum range below the 28-meter relevance boundary, prior request and alert delivery, and zero collisions.

offlane_no_engagement_pass

Moves the obstacle to the box (32,-8)–(44,4), well north of the eastbound lane, testing that automatic alert requests do not force engagement with an irrelevant obstacle; passes when a request was seen, no obstacle alert was ever seen, the vehicle arrives collision-free, and the final OBAVOIDING value is not active, running, or end.

no_refinery_pass

Sets use_refinery=false, selecting the direct OF_Reflector path without refinery plateau/basin regions; this retained compatibility smoke test proves the setting is accepted and produces a collision-free arrival, but no published telemetry distinguishes the internal construction branch.

two_obstacles_clean_pass

Posts ob_one near (19,-66) at one second and ob_two near (55,-57) at two seconds, lowers transit speed to 1.6, and adds spawnxflag=OBSTACLE_SPAWNED=$[OID], testing two independent spawned avoiders; passes with an alert request, at least two OBSTACLE_ALERT deliveries, final spawn ID ob_two, arrival, and zero collisions.

static_polygon_pass

Configures the lane box directly with the behavior's polygon parameter instead of using OBSTACLE_ALERT templating, testing a launch-time obstacle; passes when the static behavior reaches OBAVOIDING=end, the vehicle arrives, and collisions remain zero.

poly_alias_pass

Configures the same launch-time lane box through the poly alias, testing equivalence with polygon; passes when the behavior reaches OBAVOIDING=end, the vehicle arrives, and collisions remain zero.

rng_flag_no_threshold_pass

Adds the same payload and $[RNG] flags without a threshold; the first publication must occur above 20 meters with payload true, distinguishing this unconditional form from the <20 case before collision-free arrival.

avoid_disabled_fail

Changes the spawned behavior condition to AVOID=false while AVOID remains initialized true, testing the no-avoidance outcome after normal request and alert delivery; the harness passes when the vehicle still arrives with exactly one encounter and one collision and OBAVOIDING=end.

bad_polygon_fail

Supplies the crossed polygon {29,-53:43,-67:29,-67:43,-53}; the expected-negative case passes only when the bridged helm state equals MALCONFIG before its deadline.

bad_pwt_inner_dist_fail

Sets pwt_inner_dist=40 above pwt_outer_dist=28 while raising completed_dist to 42; the expected-negative case requires exact helm MALCONFIG.

bad_pwt_outer_dist_fail

Sets pwt_outer_dist=8 below pwt_inner_dist=14; the expected-negative case requires exact helm MALCONFIG.

bad_completed_dist_fail

Sets completed_dist=20 below pwt_outer_dist=28; the expected-negative case requires exact helm MALCONFIG.

bad_min_util_cpa_dist_fail

Sets min_util_cpa_dist=20 above max_util_cpa_dist=16; the expected-negative case requires exact helm MALCONFIG.

bad_max_util_cpa_dist_fail

Sets max_util_cpa_dist=6 below min_util_cpa_dist=8; the expected-negative case requires exact helm MALCONFIG.

bad_allowable_ttc_fail

Sets allowable_ttc=-1; the expected-negative case requires exact helm MALCONFIG.

bad_rng_flag_fail

Sets rng_flag=<bogus AVOID_RANGE_SEEN=true, supplying a nonnumeric threshold; the expected-negative case requires exact helm MALCONFIG.

bad_cpa_flag_fail

Sets cpa_flag=AVOID_CPA_SEEN without an assignment value; the expected-negative case requires exact helm MALCONFIG.

bad_use_refinery_fail

Sets use_refinery=maybe; the expected-negative case requires exact helm MALCONFIG.

bad_pwt_grade_fail

supplies the unsupported pwt_grade=quadratic; the expected-negative case requires exact helm MALCONFIG.

Source links

Harness README Mission README