Prototype local world-worker obstacle avoidance - #26
Conversation
Live test — mechanical PASS (visual verdict pending)Tested Observed behaviour:
This is a mechanical PASS for chained local obstacle avoidance around the cultivator. Visual/naturalness verdict remains to be confirmed separately. |
|
Visual validation follow-up: mechanical local avoidance succeeded around the cultivator, but the on-screen execution did not yet look natural. User observed slight stuttering during direction changes and wants a more deliberate stop -> adjust -> move -> adjust -> move cadence. Refinement added on the same draft PR:
Expected visual sequence: blocked/hold -> AVOID TURN -> AVOID MOVE -> smooth waypoint stop -> AVOID SETTLE -> reassess/next turn. Treat the earlier mechanical result as planner PASS but visual FAIL; this refinement needs a fresh visual check. |
Visual refinement: anticipatory continuous steeringThe first local-avoidance implementation passed mechanically but failed the visual-naturalness test: chained stop/turn/waypoint phases looked robotic and introduced visible turn stutter. New approach added on the same experimental branch:
Visual acceptance target: Rhys should begin arcing around the cultivator before reaching the emergency stop distance, remain walking through the manoeuvre, and blend back toward the player without discrete stop-turn-move transitions. |
|
Live test after anticipatory-steering-1 exposed a controller-arbitration loop in a tight obstacle pocket (cultivator + MT655). The smooth steering layer would fall back to the local planner, then immediately re-enter after each short bypass waypoint, causing repeated AVOID -> STEER -> STOP hand-offs and revisiting the same small area until the 10-segment guard exhausted. Patch e5ffb7e changes anticipatory steering to sticky fallback ownership:
Expected log markers for retest: This is intended to remove the controller hand-off loop without weakening collision safety or the smooth anticipatory path in normal open-space avoidance. |
|
Parking this PR as experimental research rather than a release candidate. Live testing proved local obstacle avoidance can mechanically route around machinery, but the current controller arbitration/fallback path sacrifices the smooth, human-looking motion that made straight/curved/follow locomotion successful. Preserve this branch intact for future navigation work; do not merge into the active development line. Continue new world-worker development from the validated obstacle-awareness checkpoint (PR #25) unless/until we deliberately resume navigation research. |
Summary
Builds directly on the validated obstacle-awareness checkpoint (PR #25) and adds the first automatic local avoidance behaviour for FOLLOW.
Behaviour
HP_WorldLocalAvoidance.luaArchitecture
The existing locomotion, obstacle awareness, turn-in-place escape, and FOLLOW state machines remain authoritative. This layer only chooses temporary local waypoints; it does not introduce another movement/animation controller.
Scope
This is deliberately local avoidance, not global pathfinding. There is no navmesh, obstacle geometry reconstruction, route graph, doorway search, or guarantee of escaping a large/concave enclosure.
Initial test focus
[WorldAvoidance] Loaded 2.2.0.0-alpha4-local-avoidance-1 ...appears without Lua errors.hpWorld follow A.OBSTACLE STOP/blocked state, followed after a short delay by oneAVOID PROBEandAVOID START.AVOID WAYPOINT REACHED ...; reacquiring player, followed either by direct FOLLOW or another local bypass segment if the implement still blocks the route.hpWorld unfollow Astill cancels cleanly during avoidance.