Skip to content
malter edited this page Apr 13, 2018 · 2 revisions

Robot Scene File

Introduction

A first version of using python scripts to control the simulation is implemented with the PythonMars plugin. It allows to read sensors and write motor valus via python. This way it is possible to change the controller while the simulation is running. Additionally, text can be rendered onto the 3D window and lines and pointclouds can be drawn into the simulation.

Prerequisites

We assume you already have a MARS development environment setup in ´MARS_DEV_ROOT´. Within the documentation we use ´MARS_DEV_ROOT´ as alias to the folder where you installed MARS. You should also have a simulation scene or SMURF file to load into the simulation. Open a terminal and source your environment:

cd MARS_DEV_ROOT
. env.sh

Configuration

Thy python file that is loaded by MARS is:

MARS_DEV_ROOT/install/configuration/mars_default/python/mars_plugin.py

The file includes example code for the most currently supported functionality. A detailed documentation have to be created.

The folder from where the file is loaded can be changed in the:

MARS_DEV_ROOT/install/configuration/mars_default/pypath.yml
Clone this wiki locally