Skip to content

Add openocean-messages and moos-ivp as submodules, with an init script - #2

Merged
tsaubergine merged 6 commits into
mainfrom
claude/admiring-clarke-s2ay8b
Nov 4, 2026
Merged

tsaubergine merged 6 commits into
mainfrom
claude/admiring-clarke-s2ay8b

Conversation

@tsaubergine

@tsaubergine tsaubergine commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

This PR brings IvPico's two upstream dependencies into the repository as submodules. It adds init.sh to set up a checkout, build.sh to build IvPico against them (including MOOS-IvP's helm libraries as shared libraries), and CI.

Submodules (external/)

Path Repository Pinned at
external/openocean-messages openocean-software/openocean-messages main (11a1328): the Navigation and ControlSetpoint messages
external/moos-ivp GobySoft/moos-ivp be40e2c, the head of GobySoft/moos-ivp#1: the IvP solver and behaviors, with a helm-libraries-only build

moos-ivp is marked shallow = true, since its full history is about 160 MB compared with about 30 MB at depth 1.

Before merging: external/moos-ivp points at GobySoft/moos-ivp#1's branch. Once that PR merges, move the pointer to the merge commit on GobySoft's main.

init.sh

It runs git submodule update --init --recommend-shallow, then installs the Ubuntu packages to build the submodules and IvPico:

  • cmake, ninja-build, g++, git, ca-certificates, protobuf-compiler, libprotobuf-dev;
  • openocean-messages' C++ dependencies, through its own init.sh --cxx, so the two stay in step. This also seeds openocean-messages' build options to C++ only.

MOOS-IvP's helm libraries need nothing more: no MOOS, PROJ, patch, or FLTK.

build.sh

It builds everything in build/, and nothing inside the submodules:

  1. openocean-messages (without its tests), into build/external/openocean-messages;
  2. MOOS-IvP's helm libraries (IVP_BUILD_HELM_LIBS_ONLY, BUILD_SHARED_LIBS), into build/external/moos-ivp, then installed into build/external/install, since find_package(IVP) only works from an installation;
  3. IvPico, against both.

All three use Ninja. Arguments go to IvPico's CMake (e.g. -DCMAKE_BUILD_TYPE=Release), and BUILD_DIR overrides build, as in openocean-messages' build.sh. It stops with "run ./init.sh first" if a submodule isn't checked out.

CMake

  • The top-level CMakeLists.txt finds the helm libraries with find_package(IVP CONFIG REQUIRED); their imported targets are IVP::helmivp, IVP::ivpsolve, and so on.
  • include(CTest) and a first test, helm_libs (src/test/check_helm_libs.cpp). It creates a waypoint and a COLREGS behavior with BFactoryStatic, which loads every helm library, and solves a one-function course problem with the IvP solver.

CI (.github/workflows/ci.yml)

A matrix of Ubuntu 24.04 and 26.04 containers, on amd64 (ubuntu-24.04) and arm64 (ubuntu-24.04-arm) runners: four jobs. Each one runs on pushes to main and on pull requests:

  1. installs git, so that actions/checkout makes a real clone that init.sh can check the submodules out in;
  2. runs ./init.sh, ./build.sh, and ctest.

Since each container starts clean, a dependency init.sh forgets fails the build.

README

  • Adds external/ to the repository structure.
  • The Building section is now ./init.sh, ./build.sh and ctest, with what build.sh builds where, and how to update a submodule.

Test plan

  • CI green on all four jobs: Ubuntu 24.04 and 26.04, on amd64 and arm64.
  • Locally, in clean ubuntu:24.04 and ubuntu:26.04 containers from a fresh clone, ./init.sh, ./build.sh and ctest pass, and git status (submodules included) is clean afterwards.
  • build.sh reruns incrementally, honours BUILD_DIR and passes arguments to CMake, and stops with a pointer to init.sh when the submodules are missing.
  • init.sh --help prints its usage; an unknown option exits with an error.
  • Earlier, before the helm-libraries build existed, the full MOOS-IvP build (build-moos.sh --minrobot, build-ivp.sh --nogui) also built from this submodule in a clean container. That run is what found that it needed patch and --minrobot, both no longer needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp

external/openocean-messages and external/moos-ivp are pinned at their main
branches; moos-ivp is shallow, since its full history is about 160 MB.

init.sh checks out the submodules and installs the Ubuntu packages to build
them and IvPico: openocean-messages' C++ dependencies (through its own
init.sh --cxx), Protobuf, and the compiler and build tools for moos-ivp's
libraries and non-GUI apps. The README describes the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
build-moos.sh builds MOOSToolsUI, which needs FLTK, unless given --minrobot;
build-ivp.sh's equivalent is --nogui.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
…ild/

openocean-messages builds from its submodule into build/external, so the
checkout stays clean, and IvPico finds it there. init.sh now installs Ninja
for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
…ackage(IVP)

external/moos-ivp moves to GobySoft/moos-ivp's helm-libraries branch, which
adds IVP_BUILD_HELM_LIBS_ONLY: lib_helmivp and the libraries it links, without
MOOS or its apps, optionally as shared libraries.

build.sh builds them shared into build/external/moos-ivp and installs them
into build/external/install, since find_package(IVP) only works from an
installation; nothing is built in the submodule. CMake finds them with
find_package(IVP CONFIG), and the helm_libs test creates waypoint and COLREGS
behaviors and solves a course with them.

init.sh no longer installs make and patch, which only the full MOOS build
needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
…amd64 and arm64

Each job runs init.sh, build.sh, and the tests in a clean Ubuntu container,
so it catches any dependency init.sh doesn't install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLcYK4e29B5FiPbDDJy5fp
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