DirectionalEnvironmentNAVXYTHETALAT overrides GetActionCost: after the base obstacle cost, it rejects an action when a cell the primitive's reference point crosses has a direction code whose mask forbids that segment's displacement (dot(v, d) >= 0 allowed), or when the cell is outside the grid. Per-action (dx, dy, mask) tables are precomputed with the shared DDA once per environment init; near-integer grid coordinates are snapped to avoid sliver cells from binary rounding. makePlan reads the LayeredCostmap direction snapshot once and keeps it for the whole call: PENDING or a geometry mismatch refuses to plan, a state/generation change forces planning from scratch, and the path is discarded if the field changed during the search. Environment init failure now returns false instead of exit(1). Tests: direction_environment_test (4) passes, including forward and backward ARA* detours and the no-solution case.
unicycle_0125.mprim is derived from this package's
matlab/mprim/unicycle_5cm_expensive_turn_in_place.mprim. Its resolution was
scaled from 0.05 m to 0.125 m, and each x/y sample was rounded to 1/4096 cell.
Thus sample coordinates and source translations are exactly representable in
binary, including grid-boundary ties in the table-versus-DDA test. Primitive
indices, headings, end cells and action multipliers are unchanged. This fixture
is for tests only; it is not a robot motion model.