AutoMoDe Arena Experiments
This page is in a very early stage. If you have any questions about the contents of this page, ask Ken or Jonas.
Checklist
In the future you will find a checklist for download here that you can follow if you want to run your experiments. The next sections will describe the necessary parts in more detail.
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
Compiling libraries and executables
In order to run ARGoS and AutoMoDe on the e-pucks, you need to crosscompile all necessary libraries.
- Download the cross-compiler that Ken build (TODO: Link) and extract it on your computer
- Open the TargetEPuck.cmake file and change each occurence of
/usr/local/angstrom/arm
with the path to the crosscompiler. TODO: Verify that this is the correct path.- Instead of changing every .cmake file on your system, you can also setup only one TargetEPuck.cmake file and reference it from all of your projects.
- Add to folders to the root level of your project: build and build_epuck
- Do we need to compile first before cross-compiling?
- In the folder build_epuck run the usual cmake command for that project in your terminal but add the following parameter to cmake
-DCMAKE_TOOLCHAIN_FILE=path/to/your/TargetEPuck.cmake
- Once cmake completed without any errors, run make and get your executable or library.
- Sometimes you need to install the so created executable or library to the cross-compiler for future linking. Running
sudo make install
will do so, but also has the side effect of changing the include pathlib.d
. Question: Does this only happen for sudo make install or also for just make install?
Generating mission 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.