Skip to main content

pymoos2

Pure-Python MOOS-IvP application framework. Write MOOS apps in Python with full AppCasting, wire protocol, and pAntler integration.

Install

pip install pymoos2

Quick Start

Generate a new app:

cd moos-ivp-myproject/src
python3 -m pymoos2 --GenAppCastingMOOSApp MyApp p "Your Name"

This creates pMyApp/ with a ready-to-edit Python MOOS app that:

  • Connects to MOOSDB over the native wire protocol
  • Supports AppCasting (shows up in uMAC/pMarineViewer)
  • Reads ProcessConfig from .moos files
  • Installs to bin/ via CMake alongside C++ apps
  • Responds to ktm shutdown signals
  • Handles time warp correctly

Example Mission

Generate a complete working example with two apps and a mission:

cd moos-ivp-myproject
python3 -m pymoos2 --example

Writing an App

from pymoos2 import AppCastingMOOSApp, ACTable

class MyApp(AppCastingMOOSApp):

    def on_startup(self):
        self.radius = self.config("radius", default=50.0, type=float)
        self.register("NAV_X")
        self.register("NAV_Y")

    def on_new_mail(self, mail):
        for msg in mail:
            if msg.name == "NAV_X":
                self.nav_x = msg.double()

    def iterate(self):
        self.notify("MY_OUTPUT", self.nav_x * 2.0)

    def build_report(self):
        tab = ACTable(["Variable", "Value"])
        tab.add("NAV_X", f"{self.nav_x:.2f}")
        self.report(tab)
        return True

Features

  • Pure Python — no C++ compilation, no pybind11
  • Full MOOS wire protocol (binary TCP, same as C++ clients)
  • AppCasting and RealmCasting support
  • Time warp support (MOOSTimeWarp)
  • ktm (kill the moos) UDP multicast listener
  • Mission file parsing (ProcessConfig blocks, global params)
  • Geometry DTOs for all VIEW_* types (XYPoint, XYPolygon, XYCircle, etc.)
  • NodeRecord parsing
  • py_compile syntax checking at build time
  • Works with pAntler — shebang'd scripts in bin/

Requirements

  • Python >= 3.8
  • MOOSDB running (from moos-ivp)
  • No other dependencies for core functionality
  • flask for web-based viewer apps (optional)

Metadata

Release files for pymoos2 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymoos2 0.1.0
File Size Uploaded
pymoos2-0.1.0.tar.gz 41.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymoos2 0.1.0
File Interpreter ABI Platform
pymoos2-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 103.1 kB

Release files / pymoos2-0.1.0.tar.gz

Download URL pymoos2-0.1.0.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8b06054a3fd99193956a98d5ea39e6b6ea1eab1103413d0c2dfe2f7bb1504d06
BLAKE2b-256 checksum
How to use checksums
b0716223cb89a7aedc887e91d6e88142101bdb4642df1de1fb4195e82cb0ec43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / pymoos2-0.1.0-py3-none-any.whl

Download URL pymoos2-0.1.0-py3-none-any.whl
Size 61.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76304b439372687deb68ab2c3ddd21e94bdb7f40f63366f3899e8b1ec3a96b9a
BLAKE2b-256 checksum
How to use checksums
90ca9ad8d063a2ae622dff58b298328d51d73654e78892a5cc6c3ca51647af97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page