Pure-Python MOOS-IvP application framework
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymoos2-0.1.0.tar.gz.
File metadata
- Download URL: pymoos2-0.1.0.tar.gz
- Upload date:
- Size: 41.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b06054a3fd99193956a98d5ea39e6b6ea1eab1103413d0c2dfe2f7bb1504d06
|
|
| MD5 |
04edcbd0be1201cefc0c3955bd58290d
|
|
| BLAKE2b-256 |
b0716223cb89a7aedc887e91d6e88142101bdb4642df1de1fb4195e82cb0ec43
|
File details
Details for the file pymoos2-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pymoos2-0.1.0-py3-none-any.whl
- Upload date:
- Size: 61.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76304b439372687deb68ab2c3ddd21e94bdb7f40f63366f3899e8b1ec3a96b9a
|
|
| MD5 |
2b4a54c3b8ca4195d4284ffa8371dfa5
|
|
| BLAKE2b-256 |
90ca9ad8d063a2ae622dff58b298328d51d73654e78892a5cc6c3ca51647af97
|