Skip to content

Add goby_helm_ivp, the Goby3 app for the helm library - #6

Merged
tsaubergine merged 4 commits into
claude/admiring-clarke-s2ay8b-mission-replayfrom
claude/admiring-clarke-s2ay8b-goby-app
Nov 4, 2026
Merged

tsaubergine merged 4 commits into
claude/admiring-clarke-s2ay8b-mission-replayfrom
claude/admiring-clarke-s2ay8b-goby-app

Conversation

@tsaubergine

Copy link
Copy Markdown
Member

This PR is stacked on #5 and targets its branch: #2 → #3 → #4 → #5 → this PR.

This is Phase 2 of the Goby helm plan: goby_helm_ivp, which runs ivpico::helm::Helm (#4) in Goby3.

goby_helm_ivp (src/bin/goby/helm_ivp)

  • Application: a goby::zeromq::SingleThreadApplication that iterates the helm at loop_freq (default 4 Hz, pHelmIvP's AppTick). Time comes from goby's SystemClock, so time warp works as in MOOS.
  • Groups (src/bin/goby/groups.h, constexpr, ivpico::helm::*):
    • in: navigation, variable, command;
    • out: solution, status (every loop), posting, behavior_event, life_event, visualization, offboard_message, objective_function, configuration.
  • Config (HelmIvPConfig, in goby3's style):
    • app, and interprocess (also from GOBY_INTERPROCESS);
    • loop_freq;
    • helm, which is ivp.interface.HelmConfig; helm.ownship defaults to interprocess.platform;
    • frontseat.
  • Frontseat bridge (frontseat { enable: true }):
    • NodeStatus becomes the vehicle's Navigation: degrees to radians, speed over ground and over water;
    • each Solution becomes a DesiredCourse, with zeros during an allstop as pHelmIvP posts;
    • a HelmStateReport goes out every loop: DRIVE → HELM_DRIVE, PARK → HELM_PARK, otherwise HELM_NOT_RUNNING.
  • Geodesy: lat/lon ↔ x/y uses goby's datum (app.geodesy), which must be set at startup.
  • Logging and health:
    • behavior warnings and errors go to glog.is_warn(), events to is_verbose();
    • health is FAILED (with the config warnings) when MALCONFIG, and DEGRADED (with the halt message) when a behavior halts the helm.
  • No poke app: goby zeromq publish publishes Variables and Commands once libivpico_interface.so is loaded (-l or GOBY_TOOL_LOAD_SHARED_LIBRARY).

Alpha example (launch/goby/alpha)

goby3-examples' frontseat_basic_sim, with goby_helm_ivp in place of MOOSDB and pHelmIvP. deploy.sh deploys it with goby zeromq publish. I ran it for 40 s at warp 10: the helm drove the simulated vehicle around the survey (820 DesiredCourses) and then parked at the end, as pHelmIvP does in s1_alpha. goby_liaison is commented out in the launch file, because it comes from goby3-gui, which init.sh doesn't install.

Test (ctest goby_helm_ivp, when Goby3 is found)

src/test/goby/test_goby_helm_ivp.sh:

  1. runs gobyd and the app, with a constant-heading behavior and a datum;
  2. publishes one frontseat NodeStatus with goby zeromq publish;
  3. checks for a DesiredCourse with heading 90, HELM_DRIVE, and Status DRIVE.

Other changes

  • find_package(Protobuf) and find_package(openocean_messages) move to the top-level CMakeLists, since src/bin now needs them too.
  • README: repository structure and a "Goby app" section.

Notes

  • cfg() isn't valid until goby's base classes are constructed, so the app sets its loop frequency in its constructor body. Passing cfg().loop_freq() to the base constructor read garbage and crashed now and then in Thread::set_loop_frequency. The second commit's message says that fix is in it, but it actually went in with the first commit.
  • Still to come in Phase 2: the closed-loop mission runs under Goby (ivpico_mission_check), in a follow-up PR.

Test plan

  • ctest: all 11 tests pass: helm_libs, helm, 8 × replay_*, and goby_helm_ivp (3/3 runs).
  • The alpha example runs end to end with Goby 3.6.1 on Ubuntu 24.04.
  • CI on all four jobs (Goby3 from packages.gobysoft.org).

Generated by Claude Code

- A goby::zeromq::SingleThreadApplication that runs ivpico::helm::Helm at
  loop_freq (default 4 Hz), on goby's warp-aware SystemClock.
- Groups ivpico::helm::* (src/bin/goby/groups.h): navigation, variable and
  command in; solution, status, posting, behavior_event, life_event, etc.
  out.
- Config: app, interprocess, loop_freq, helm (ivp.interface.HelmConfig;
  ownship defaults to interprocess.platform) and frontseat.
- Optional frontseat bridge: NodeStatus in as the vehicle's Navigation;
  DesiredCourse and HelmStateReport out.
- Geodesy from goby's datum, glog for behavior warnings and events, and
  health: FAILED when MALCONFIG, DEGRADED when a behavior halts the helm.
- launch/goby/alpha: goby3-examples' frontseat simulation with
  goby_helm_ivp in place of MOOS, and deploy.sh, which deploys with
  goby zeromq publish.

Protobuf and openocean-messages are found at the top level now, since
both src/lib and src/bin use them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
- src/test/goby/test_goby_helm_ivp.sh (ctest goby_helm_ivp, when Goby3 is
  found) runs gobyd and the app, publishes a frontseat NodeStatus with
  goby zeromq publish, and checks for DesiredCourse heading 90,
  HELM_DRIVE and Status DRIVE.
- goby_helm_ivp sets its loop frequency once its base classes are
  constructed: cfg() isn't valid before then, and read garbage (a crash
  in Thread::set_loop_frequency).
- launch/goby/alpha leaves goby_liaison commented out, since it comes from
  goby3-gui, which init.sh doesn't install.
- README: the helm, the Goby app and how to run the alpha example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
libgoby3-dev only recommends it, so with --no-install-recommends the
Goby app failed to link on a clean Ubuntu 26.04 (libais.so missing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
goby_add_app() runs protoc with --dccl_out; libgoby3-dev only recommends
the plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
@tsaubergine
tsaubergine added this pull request to stack #8 November 3, 2026 23:30
@tsaubergine
tsaubergine merged commit be97f06 into main Nov 4, 2026
4 checks passed
@tsaubergine
tsaubergine deleted the claude/admiring-clarke-s2ay8b-goby-app branch November 4, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants