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
.moosfiles - Installs to
bin/via CMake alongside C++ apps - Responds to
ktmshutdown 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_compilesyntax 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
flaskfor 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)
| File | Size | Uploaded | |
|---|---|---|---|
| pymoos2-0.1.0.tar.gz | 41.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|