Picassnake: the painting robot
Picassnake is our custom-made robot that paints pictures from music.
Picassnake consists of an arm and a head, embedded in a plush snake doll. The robot is connected to a laptop for control and music processing, which can be fed through a microphone or an MP3 file. To open the media source, an operator can use the graphical user interface or place a text QR code in front of a webcam. Once the media source is opened, Picassnake generates unique strokes based on the music and translates the strokes to physical movement to paint them on canvas.
To generate unique strokes, Picassnake does frequency analysis of the music. After taking some time to think, Picassnake decides the color of a stroke based on the loudness of the highest frequency range (14k-22k). The start point of a stroke is the end point of last stroke. Picassnake decides the end point of the stroke by calculating a distance and angle from the start point based on spectrum of the music. The code for this calculation is presented below. In addition to strokes, Picassnake also detects beats of the music to move its head up and down. The beat detection algorithm is retrieved from http://archive.gamedev.net/archive/reference/programming/features/beatdetection/.
Picassnake plans physical motions using precalibrated servo positions. There are 5 positions specifying the locations of three color paints, water to clean the brush, and paper towels to dry, and 13 positions on canvas (3x3 grid points which are 9 positions, and the center positions of 4 equally sized sub-rectangles of the canvas). To cover the entire canvas with the limited number of positions, we use triangular interpolation (pick three closet points and interpolate based on the distance from them to the destination).
With mechanical characteristics of the robot and the signature of the music, Picassnake draws an interesting and unique abstract painting of the music.
A map to calibrate the 13 canvas points (every intersection on the map is a point).
Robot arm without plush doll.
Following videos are for RobotArt competition in 2016 (robotart.org)