Repository navigation
Add libivpico_helm: pHelmIvP's helm loop without MOOS - #4
Merged
tsaubergine merged 1 commit intoNov 4, 2026
Conversation
ivpico::helm::Helm ports HelmIvP's startup, mail handling and Iterate() onto the interface messages. HelmEngine, BehaviorSet, the modes and the behaviors are MOOS-IvP's own, unchanged. - Inputs (Navigation, Variable, Command) are queued and applied at the start of the next iterate(t), as pHelmIvP applies its mail. - What pHelmIvP would have posted to the MOOSDB on one iteration is fed back on the next, for the variables the helm registered, as the MOOSDB echoes it. Behaviors that update or spawn each other depend on this. - "initialize_" (deferred) variables are posted after defer_window if nothing else has set them. - Each iteration returns an Output: the Solution, Status, Postings, BehaviorEvents and LifeEvents, and ObjectiveFunctions if asked for. - interface/config.proto adds HelmConfig, pHelmIvP's configuration. - Contacts from Navigation (self: false) or NODE_REPORT variables go into a ContactLedger and LedgerSnap; alerts come later. src/test/helm/test_helm.cpp runs scenarios with a fake clock: the s1_alpha pattern (with and without park_on_allstop), an update between behaviors through the echo, spawning, allstop reasons, MALCONFIG, and deferred initialize. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
This was referenced Oct 27, 2026
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.
This PR is stacked on #3, which is stacked on #2, and targets #3's branch. Merge those first.
This is the first half of Phase 1 of the Goby helm plan: the helm library, which has no middleware. The second half (replaying recorded MOOS-IvP missions against it) comes in the next PR.
ivpico::helm::Helm(src/lib/helm)The class ports HelmIvP's startup (
OnStartUp), mail handling (OnNewMail) andIterate()onto theivp.interfacemessages.HelmEngine,BehaviorSet, modes and behaviors are MOOS-IvP's own, from the helm libraries, used unchanged.Navigation,Variable,Command) are queued byhandle()and applied at the start of the nextiterate(t), as pHelmIvP applies its mail before each iteration.Variablewith a key pHelmIvP treats specially (MOOS_MANUAL_OVERRIDE, BHV_ABLE_FILTER, NODE_REPORT, HELM_MAP_CLEAR, …) is handled the same way. So the helm can take MOOS variables as they are.initialize_(deferred) variables are posted afterdefer_window(default 1 s) if nothing else has set them. This stands in for the MOOSDB sending current values on registration.Output:Solution(decisions, or zeros on an allstop), only on iterations where pHelmIvP posts DESIRED_*;Status: state, allstop, modes, behaviors with run states, contacts, CPU and piece counts;Postings from behaviors, modes, initialize and helm start;BehaviorEvents (BHV_WARNING, BHV_ERROR, …);LifeEvents;ObjectiveFunctions, ifreport_objective_functionsis set.Navigationwithself: false, or a NODE_REPORT variable, goes into aContactLedgerand theLedgerSnapthat contact behaviors read. The alerts that spawn contact behaviors come in Phase 3.conversions.h): radians clockwise from north to degrees,Navigation.speedselection,NavigationtoNodeRecord, the able-filter string, and decisions toControlSetpointfields (customfor domain variables with no field).interface/config.protoaddsivp.interface.HelmConfig, pHelmIvP's configuration block. Its unset optional fields take pHelmIvP's defaults.Tests (
src/test/helm/test_helm.cpp)Scenarios with a fake clock, and a simple vehicle model where needed:
park_on_allstop, the helm parks when the survey completes, because no behavior produces a function on that iteration. That's what real pHelmIvP does: I ran MOOS-IvP's own s1_alpha mission headless, and its log showsRETURN=true,IVPHELM_ALLSTOP=NothingToDo, thenIVPHELM_STATE=PARK..bhvfile.Test plan
./build.shandctest:helm_libsandhelmpass.Generated by Claude Code