Drum Player IRL
Description:
The Drum Player is a robotic arm actuated by two servomotors, the first one allowing to move the arm horizontally, while the second one allows to raise and lower it. At the end of the arm is placed a contact sensor, consisting of a piano wire rod, passing through a metal circle. When the arm touches an object, the rod makes contact with the ring, allowing the detection. The robot is controlled by a Raspberry Pi 2 mini-computer. The figure below shows the wiring of the robot components:
The robot is controlled by a Python script exchanging data with an external decision system in the same way as the simulated Drum Player, through two text files, a solution that facilitates porting to different operating systems and the use of other programming languages. The decision cycle starts with the decision mechanism, which writes the symbol for an interaction in
intention.txt
file and then waits until enacted.txt
file is empty. The robot waits until intention.txt
file is no longer empty, then, reads the symbol, deletes the file content and performs the interaction. At the end of the interaction, the robot writes the symbol of the enacted interaction in enacted.txt
file. The decision system can then read this symbol and, after deleting it, integrate the result of its intention.
The script controlling the robot proposes an interactional system composed of 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_playerIRL.zip: archive containing the robot control script, exchange files, and two Python scripts (test_random.py and test_gamme.py) allowing to test the robot.
We interfaced the sequential learning mechanism developed by Olivier Georgeon. Here, the robot can tap left, right and center. In this video, we try to teach it to play the right-right-middle-middle sequence. After 5 minutes of learning, the agent finally starts to play this sequence.