Repository navigation
contextual: require a climb head only for rules that read climb_pred - #305
Open
gabriellemerritt wants to merge 3 commits into
Open
gabriellemerritt wants to merge 3 commits into
gabriellemerritt wants to merge 3 commits into
Conversation
…del without a climb head A model can be trained with command column 14 as its climbing gait yet export no climb_pred head (Draco Alpha's contextual locomotion students). SetDz refused any dz for such a model, so it could never climb. ContextualConfig.climbing_column_trained (default false, so every existing caller is unchanged) lets an external dz select column 14 under the default rules (climb_enter dz_or_pred, climb_exit both_off), where climb_pred never fires: climb while dz is on. Rules that read climb_pred still require the head at load.
… (replaces climbing_column_trained) Review: no extra option. A model without climb_pred now loads under the rules that read none (climb_enter dz_or_pred or dz_only, climb_exit both_off) and climbs on the external dz alone; the head stays required for require_climb_head, force_manual_climbing, dz_and_pred and any exit other than both_off. SetDz no longer refuses a no-head model: the constructor already refused one whose rules need the head.
The contextual kernel became PrimitiveFamily with enum climb rules: the climb-head check uses ClimbEnter/ClimbExit, and PrimitiveFamily::SetDz no longer refuses a model without a head.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A contextual policy needs a
climb_predhead only when something reads it:require_climb_head);force_manual_climbing;climb_enter: dz_and_pred, or aclimb_exitother thanboth_off.Under
climb_enter: dz_or_predordz_onlywithclimb_exit: both_off, a model without the head now loads, and the external dz alone enters and leaves the climbing gait (column 14).SetDzno longer refuses a no-head model: the constructor already refuses any whose rules need the head.Why
Draco Alpha's contextual-locomotion students (tkbest's
ctxloco_v9, 2026-11-07) are trained with column 14 as the climbing gait but export noclimb_pred.SetDz(true)threw"dz requires climb_pred"for them, so FAR-pi's nav benchmark never let Alpha climb. With this change, nav's dz plus the configured enter/exit rules are enough.The first revision added a
climbing_column_trainedoption. Per review it is dropped: the climb rules already say whetherclimb_predis read.Testing
ContextualApi.ValidatesGraphAndOptionalClimbHeadThroughPublicFactoryloads the no-head fixture under the default rules and checks:effective_command() == 14), and dz off leaves climbing;dz_onlyloads;dz_and_predis still refused.The C++ was not built locally, so this relies on CI. Pre-commit is clean.
Consumer: amazon-far-internal/FAR-pi#260.