Skip to content

MORSE Simulator Integration

Martin Llofriu edited this page Dec 20, 2016 · 3 revisions

Introduction

The MORSE simulator is a robotics simulator developed for the academic environment. It adds physics and sensor based simulation capabilities to SCS.

It provides a socket based interface that allows the programmer to control the simulation from any language that supports them.

The integration with MORSE simulation is done through the robot and universe interfaces, so any model programmed for the virtualuniverse should work with the MORSE simulator.

Pre-requisites

Besides being able to run normal SCS models (see here), one has to install the MORSE simulator.

In a new Ubuntu, this is done through apt-get:

sudo apt-get install morse-simulator

Example - Multi-Scale Actor Critic Morris Maze with MORSE

The multi-scale actor critic Morris maze model runs also with the MORSE simulator.

The XML file is in multiscalemodel/src/edu/usf/ratsim/experiment/xml/morris/multiscale/actorcritic/morse.xml.

This model can be run with the usual visualExec.sh script, as explained here.

One should see a screen as follows:

The file in platform/src/edu/usf/experiment/universe/morse/morris/default.py defines the setup of the environment. If fastmode (line 22) is set to False, a better rendering is obtained:

Extending the MORSE integration

In order to integrate MORSE with SCS one must first build a complete MORSE simulation environment, with its own "maze" and robot. Thus, the MORSE tutorials should be first read and understood.

After the MORSE simulation is running by itself, there are several "points of conctact" with the SCS platform:

  • The MorseUniverse class serves as a proxy to the MORSE world and instantiates the Universe interface
  • The MorseUtils class provides services such as starting the simulator as a decoupled process and keeping track of the streaming ports to query sensors and issue motion commands.
  • The MorseRobot provides an example robot interface. This robot contains three IR sensors and allows to specify x,y velocity components. If a different feature is to be included in the MORSE robot, such as a LIDAR sensor, the MorseRobot must be extended or replaced by a proxy that takes this into account. The MorseRobot class is responsible of making motions happen in the simulator, and assessing the location of feeders, walls, etc, using the robot's sensors.