Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
/ pymoos Public archive

Python bindings for the Mission Oriented Software Suite (MOOS).

Notifications You must be signed in to change notification settings

russkel/pymoos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyMOOS

Please use https://github.com/msis/python-moos if you are just getting started with Python on MOOS. This is a nicer implementation than the old version found here.

Python 3 bindings for the Mission Oriented Software Suite (MOOS).

Changelog

  • v2020.01
    • Fixed CMake to use whatever version of Python 3 available on the system.
    • Added Travis CI
    • Clean up code (clang-format and black).
  • v2019.07

Dependencies

  • MOOS Core
  • Python 3
  • Boost libraries (Boost Python compiled against Python 3)

Newer Ubuntu installations ship with both 2.7 and 3 versions of the Boost Python library. For older versions (or other OS's) Boost Python must be compiled and linked against Python 3.

Building MOOS

The pymoos bindings require that the core MOOS packages be installed:

git clone https://github.com/themoos/core-moos.git
cd core-moos
mkdir build
cd build
cmake ..
make

Building and Installation

The pymoos bindings can be downloaded and installed by:

git clone https://github.com/russkel/pymoos.git
cd pymoos
mkdir build
cmake ../
make
sudo make install

The installation can be tested by:

python3
import pymoos.MOOSCommClient

If an import error occurs check that the installation directory (usually /usr/local/lib/python3/dist-packages on Ubuntu) is included in your PYTHONPATH. If not it can be added by:

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3/dist-packages

Example Usage

The following code snippet creates a MOOS comm client from Python and connects to a database hosted on the local machine. From a Python3 interpreter, run:

from pymoos.MOOSCommClient import MOOSCommClient
m = MOOSCommClient()
m.Run( "127.0.0.1", 9000, "pymoos_test", 10)

History

The pymoos bindings were originally written by Ian Baldwin and then fixed up by David Hodo, but this repository hasn't seen an update in some years.