AutoMoDe Arena Experiments

From IridiaWiki
Revision as of 21:22, 27 March 2018 by JonasKuckling (talk | contribs) (Added text to running experiments.)
Jump to navigationJump to search

This page is in a very early stage. If you have any questions about the contents of this page, ask Ken or Jonas.

Getting started

Ken has already prepared a number of helpful scripts that can help when running experiments in the arena. They are available on his github account.

You will need an account on the arena computer (?) and for the Iridia Tracking System. Ask Ken (?) if he can help you set them up.

Generating the files

The script ExpGen.py generates most of the files that you will need to run your experiments. It takes a couple of arguments (a short summary can be obtained by the -h option). (TODO: Explain the arguments a little bit more)

  • An .xml file that contains the template for the mission .xml (or .argos) file.
  • Another .xml file that contains the template for the initial positioning with the Iridia Tracking System.
  • The number of experiments that are run.
  • The file that contains the random seeds for the experiments.
  • The output file where the seeds, ids, and mission files are listed. The output file will be formatted in Markdown, if you want to have a visual representation, than you will need to convert the file (for example to html or pdf).

The script will load your controllers (you may need to adjust the script to your needs), create a random order for your experiments and copy your controllers and seeds into the corresponding templates. It will also create two scripts called startE.sh and startPathPla.sh. The startE.sh script is intended to be uploaded to the E-Pucks where it will start a single run of the experiment. The other script (startPathPla.sh) is executed on the computer in the lab, where it will start Argos for the positioning of the robots in the arena.

Preparing the robots

Before using the robots you need to put in the batteries from the charging port. It is recommended that you put the batteries into the box labelled "charged" so that you always know which batteries are for your use. Put the batteries without the cable in the bottom slot of the e-puck and the battery with the cables in the top slot of the e-puck. When connecting the cable, make sure that it is twisted inward so that the robots do not get caught on each other. Once you have placed the batteries, toggle the bottom switch first to see, if the battery was placed succesfully. Sometimes it doesn't connect properly and than the LED in the e-puck will not light up, when the switch is toggled. If the bottom battery sits well, toggle the switch for the top battery.

Uploading scripts to the e-pucks can be done by either one of two scripts that Ken provided: makeupload.py or massupload.py. The main difference between the two scripts is that makeupload.py will make the AutoMoDe executable and upload it to the specified e-pucks, while massupload will simply copy folders and files from the arena computer to the e-pucks. TODO: Explain more about how these scripts work and the epucks.json file that they use.

Once all the necessary scripts are uploaded to the e-pucks, place them in the arena and make sure that the tags on the top are pointing to the front of the e-puck. TODO: Explain how to connect to all e-pucks simultaneously.

Running the experiments

Once the robots are setup, connect to the tracking system (via ssh?). In the folder arena_tracking_system you should find a couple of scripts that you can execute in order to use the tracking system. Execute ./server conf/resources.xml cond/track_from_stream.xml to start the tracking process. If you only want to verify that your setup is working, run ./arena-viewer conf/resources.xml cond/track_from_stream.xml. Once the server is started, run ./startPathPla.sh \<ID\> where the ID is the one that the ExpGen.py file created for you.

Start the script ??? on the e-pucks and then press "Play" in the argos window on the arena computer. Once all robots approximately reached there position, stop and exit argos.

Run argos with the mission file and the seed (as given by the experiment configuration returned by ExpGen.py) and execute ./startE.sh <ID> on the e-pucks. Press Play in Argos and wait until the experiment is finished. Then exit write down the score and exit Argos.

Cleaning up again

Checklist

In the future you will find a checklist for download here that you can follow if you want to run your experiments.