Teaching baby humanoid iCub to write ‘iCub’ and beyond Vishwanathan Mohan, Pietro Morasso, Giorgio Metta, Jacopo Zenzeri,Giulio Sandini Robotics, Brain and Cognitive sciences Department, Italian Institute of Technology, Genova, Italy. (vishwanathan.mohan, pietro.morasso, giorgio.metta)@iit.it A monkey trying to cling to a branch of a tree, a couple dancing, a woman embracing her baby or a baby humanoid manipulating a ball are all essentially attempting to shape their bodies to conform with the shape of the worlds with which they are interacting. The shared underlying essence behind perceiving objects in the environment for example a cylinder, a ball, an amoeba etc, reading handwritten scripts, enjoying art or performing movements ourselves like reaching, moving, pointing in specific trajectories, coordinating ones fingers while manipulating objects, scribbling, drawing and imitating is the notion of a ‘shape’ and the core cognitive faculty of ‘perceiving and synthesizing’ shapes. In this article, we describe our attempts to create this ability in the humanoid iCub in a very general and abstract sense, thereby facilitating its use several different contexts. We specifically deal with the case of iCub gradually learning to write or scribble shapes (to be frank) on a drawing board after observing a demonstration by a teacher and aided by a series of self evaluations of its performance. Learning to imitate a demonstrated human movement can be seen as a special case of this system, writing task of course imposing additional constraints of making smooth planar trajectories on the drawing board with a manipulated tool (in this case the paint brush) coupled to the arm. The computational architecture of the proposed shape perception/synthesis system is built by unifying two significant theoretical frameworks: a) Catastrophe theory (CT) originally proposed during the late 1960’s by the French mathematician Rene Thom [1] to formally explain the origin of forms and shapes in nature, further developed by Zeeman[2], Gilmore[3] among others and applied to a range of problems in engineering and physics; b) A generalization of the Equilibrium point hypothesis [5,6] called the Passive Motion Paradigm (PMP) [7,8,9] that on the other hand deals with the problem of coordinating motion of bodies with arbitrary complexity and redundancy, taking into account a range of internal and task specific constraints. According to CT, the global shape of a smooth function f(x) can be fully characterized by a set of special local features (like peaks, valleys etc) called critical points, where first and probably some higher order derivatives vanish. Further developing CT, [4] have shown that following 11 CP’s are sufficient to characterize the shape of any line diagram: Interior Point, End Point, Bump (i.e maxima or minima), Cusp, Dot, Cross, Star, Angle, Wiggle, T and Peck. In short, CT provides a systematic framework to extract the ‘essence’ of a complex shape that iCub observes in the demonstration. For example the essence of the shape ‘C’ is the presence of a bump or a maxima somewhere in the middle, the shape ‘0’ is composition of a maxima and minima and so on. We call this minimal (and context independent) representation as the abstract visual program (AVP). AVP is transformed into a concrete motor goal (CMG) by applying some context to the context independent AVP like: a processes of transformation (from image plane to Cartesian space), specification of scaling/ amplification during shape synthesis, specification of the kinematic chain/ body DoF involved in the action generation and other task specific constraints (like kinematic model of tool etc). Virtual Trajectory synthesis system (VTGS) now has the function of synthesizing a smooth trajectory between the CP’s specified by the CMG. For the simple case of 2 CP’s (as in the example of synthesizing a shape ‘U’ in figure 2b) VTGS is a dynamical system described by where K defines the virtual stiffness and ɤ implements the terminal attractor dynamics. The basic idea is that by pseudo randomly exploring the space of K and the overlap between different time base generators (ɤ), different trajectories through the CP’s can be synthesized. Few examples are shown in figure 2b and 2c. The virtual trajectory now acts like an attractor to the kinematic chain involved in generating the movement using the PMP, i.e at this point the internal body model is coupled to the virtual trajectory to generate the motor commands necessary for action generation. The motion of the kinematic chain evoked by the activation of virtual targets generated by VTGS is equivalent to integrating non-linear differential equations that, in the simplest case take the form: x x K J A J x T eff T where K eff is the virtual stiffness that connects the virtual target to the end effector, and A is the admittances in the joint space, and J the Jacobian matrix of the involved kinematic chain. Note the inherent modularity in the architecture, it is possible to perform the same action with different body chains (for example when we draw a circle on a black board or run a circle in a football ground, what ) x x )( t ( K ) x x )( t ( K x T 2 T 2 2 T 1 T 1 1 T