Drum Player, a simulator to test sequential learning mechanisms

Simulation

Description:

A simulated robot arm based on the Blender Game Engine (BGE), designed to test sequential learning mechanisms. It is inspired by Olivier Georgeon's work, and in particular his simulation of the Poppy robot, based on V-rep. The goal of this simulator is to propose a fully open-source and easily usable platform to test learning mechanisms.

The Drum Player is a robotic arm with two degrees of freedom, and a contact sensor at the end of the arm to detect drum contact. The simulation is configured to play seven notes, and detect whether the note has been played or not. When the arm taps on a drum, a sound, from the sound folder, is played. It is of course possible to replace the played notes by other sounds, by replacing the sound files of the sound folder.

The simulator communicates with an external decision system through two text files. This solution, in addition to its simplicity, facilitates implementations on different operating systems and with other programming languages. The decision cycle starts with the decision mechanism writing the symbol for an interaction in intention.txt file and then waiting until enacted.txt is empty. The simulator waits until intention.txt file is no longer empty, then, when it is, reads the symbol, clears it, and performs the interaction. At the end of the interaction, the simulator writes the symbol of the interaction enacted in enacted.txt. The decision system can then read this symbol and, after deleting it, integrates the result of its intention.

PRI
Communication system between the decisional system and the simulator
The simulator proposes an interactional system based on 14 interactions, each identified by a number:

id do re mi fa sol la si
success 0 2 4 6 8 10 12
failure 1 3 5 7 9 11 13


Ressources:

- drum_player.zip: archive containing the Blender file of the simulator, communication files, note sounds in mp3 format, as well as two Python scripts (test_random.py and test_gamme.py) allowing to test the simulator. Requires Blender 2.69 or higher.


Installation

To install the simulator, unzip the archive in any directory, then open drum_player.blend file with Blender. The simulation is launched by pressing 'P' key, and ends by pressing 'Esc'. Once launched, the simulator waits for a command in intended.txt file. It is possible to test the simulator with the test_random.py and test_gamme.py scripts, by running the python command python test_random.py or python test_gamme.py from the Ernest_simulator directory. The first script plays random notes, the second script plays the notes in order. If the robot starts moving, the simulator is ready.

Controls:

it is possible to control the arm, drums and camera during the simulation with the following list of commands:

Play notes:
keys 'a', 'z', 'e', 'r', 'u', 'i', 'o' to play the 7 notes

place/emove drums: keys 'q', 's', 'd', 'f', 'j', 'k', 'l'

control the camera (numeric keypad):

translations
5 : forward
2 : back
1 : left
3 : right
/ : up
8 : down

rotations
4 : left
6 : right
* : up
9 : down

zoom : + and -

Drum Player in action: left, driven by test_game.py, right, by test_random.py