IMPORTANT: This repository has been moved here: https://github.com/mivp-agent/moos-ivp-agent
Model agnostic ML tooling for MOOS-IvP. See very simple implementation below based on the ManagerExample. See the mivp-agent.github.io website for more information about getting started.
VEHICLES = ['alder', ]
from mivp_agent.manager import MissionManager
with MissionManager() as mgr:
print('Waiting for vehicle connection...')
mgr.wait_for(VEHICLES)
while True:
# Get state message from server
msg = mgr.get_message()
# Decide on action
action = None
if msg.state['NAV_X'] < 100:
action = {
'speed': 2.0,
'course': 90.0
}
if msg.state['NAV_X'] > 50:
action = {
'speed': 2.0,
'course': 270.0
}
# Respond to BHV_Agent's message with an action
msg.act(action)
This project builds upon the ground work done by moos-ivp-pLearn. It implements a "model bridge" from moos-ivp to python 3.x land.
The above example shows how to use MissionManager
(python) with BHV_Agent
(MOOS-IvP). This repository also contains useful tools for training MOOS-IvP agents like pEpisodeManager
See this page for instructions for each major OS.
git clone https://github.com/CarterFendley/moos-ivp-agent.git
See the docker section below for usage of the docker container.
Follow the post install instructions for docker here
Install XQuartz for the GUI components to render properly.
pMarineViewer
has a compatibility issue with connections inside of the docker container on some versions of OSX. On your host NOT docker terminal enter the following command.
defaults write org.xquartz.X11 enable_iglx -bool true
Run the following command to start XQuartz (again, on a host terminal).
xhost +
After the command completes go to the task bar and XQuarts > Preferences > Security
and check the box labeled Allow connections from network clients
. After doing this you will need to restart xhost. The following method will work among others.
killall Xquartz
xhost +
My pMarine viewer will not show up
If on mac, read the "XQuartz on OSX section" carefully and follow the steps. After done, restart the docker container & XQuartz.
I can't install or get something work
Open an issue this repository is still very young and I need to know about any issues with the install process.
This repo comes with the docker.sh
script for OSX and Linux to make managing it's docker container easier.
Note the password for the moos
user is moos
We can build the mivp-agent
image with the following usage. The first time you run this it will take a while.
./docker.sh build
The image will take a while to build the first time.
If no mivp-agent
container is running, the following command will start one and put you in a bash shell inside the container.
REALLY IMPORTANT NOTE: This script will create a link between the moos-ivp-agent/examples
, moos-ivp-agent/src
, and moos-ivp-agent/missions
folders on the host machine and the docker container. Any change on the host or docker container will be reflected in the other. This is intended to make development and data exfiltration easier but can very easily get you into trouble if not cautious.
NOTE: If previously run, you will need to ./docker.sh rm
before starting another container. See below.
./docker.sh run
If you want another terminal inside the running container use the following command.
./docker.sh connect
The following sequence of commands will both stop the mivp-agent
container (regardless of any activity) and remove the container.
./docker.sh stop
./docker.sh rm
See the mivp-agent.github.io website for more information about getting started.