<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/frobt.2017.00045</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Prediction of Intention during Interaction with iCub with Probabilistic Movement Primitives</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Dermy</surname> <given-names>Oriane</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="corresp" rid="cor1">&#x0002A;</xref>
<uri xlink:href="http://frontiersin.org/people/u/419777"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Paraschos</surname> <given-names>Alexandros</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<xref ref-type="aff" rid="aff5"><sup>5</sup></xref>
<uri xlink:href="http://frontiersin.org/people/u/164681"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Ewerton</surname> <given-names>Marco</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Peters</surname> <given-names>Jan</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<xref ref-type="aff" rid="aff6"><sup>6</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Charpillet</surname> <given-names>Fran&#x000E7;ois</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Ivaldi</surname> <given-names>Serena</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<uri xlink:href="http://frontiersin.org/people/u/119685"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Inria</institution>, <addr-line>Villers-l&#x000E9;s-Nancy</addr-line>, <country>France</country></aff>
<aff id="aff2"><sup>2</sup><institution>Universit&#x000E9; de Lorraine, Loria, UMR7503</institution>, <addr-line>Vandoeuvre</addr-line>, <country>France</country></aff>
<aff id="aff3"><sup>3</sup><institution>CNRS, Loria, UMR7503</institution>, <addr-line>Vandoeuvre</addr-line>, <country>France</country></aff>
<aff id="aff4"><sup>4</sup><institution>TU Darmstadt</institution>, <addr-line>Darmstadt</addr-line>, <country>Germany</country></aff>
<aff id="aff5"><sup>5</sup><institution>Data Lab, Volkswagen Group</institution>, <addr-line>Munich</addr-line>, <country>Germany</country></aff>
<aff id="aff6"><sup>6</sup><institution>Max Planck Institute for Intelligent Systems</institution>, <addr-line>Tubingen</addr-line>, <country>Germany</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Lorenzo Jamone, Queen Mary University of London, United Kingdom</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Rodolphe Gelin, Aldebaran Robotics, France; Francesco Rea, Fondazione Istituto Italiano di Tecnologia, Italy; Mirko W&#x000E4;chter, Karlsruhe Institute of Technology, Germany</p></fn>
<corresp content-type="corresp" id="cor1">&#x0002A;Correspondence: Oriane Dermy, <email>oriane.dermy&#x00040;inria.fr</email></corresp>
<fn fn-type="other" id="fn001"><p>Specialty section: This article was submitted to Humanoid Robotics, a section of the journal Frontiers in Robotics and AI</p></fn>
</author-notes>
<pub-date pub-type="epub">
<day>05</day>
<month>10</month>
<year>2017</year>
</pub-date>
<pub-date pub-type="collection">
<year>2017</year>
</pub-date><volume>4</volume>
<elocation-id>45</elocation-id>
<history>
<date date-type="received">
<day>31</day>
<month>05</month>
<year>2017</year>
</date>
<date date-type="accepted">
<day>21</day>
<month>08</month>
<year>2017</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2017 Dermy, Paraschos, Ewerton, Peters, Charpillet and Ivaldi.</copyright-statement>
<copyright-year>2017</copyright-year>
<copyright-holder>Dermy, Paraschos, Ewerton, Peters, Charpillet and Ivaldi</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract>
<p>This article describes our open-source software for predicting the intention of a user physically interacting with the humanoid robot iCub. Our goal is to allow the robot to infer the intention of the human partner during collaboration, by predicting the future intended trajectory: this capability is critical to design anticipatory behaviors that are crucial in human&#x02013;robot collaborative scenarios, such as in co-manipulation, cooperative assembly, or transportation. We propose an approach to endow the iCub with basic capabilities of intention recognition, based on Probabilistic Movement Primitives (ProMPs), a versatile method for representing, generalizing, and reproducing complex motor skills. The robot learns a set of motion primitives from several demonstrations, provided by the human via physical interaction. During training, we model the collaborative scenario using human demonstrations. During the reproduction of the collaborative task, we use the acquired knowledge to recognize the intention of the human partner. Using a few early observations of the state of the robot, we can not only infer the intention of the partner but also complete the movement, even if the user breaks the physical interaction with the robot. We evaluate our approach in simulation and on the real iCub. In simulation, the iCub is driven by the user using the Geomagic Touch haptic device. In the real robot experiment, we directly interact with the iCub by grabbing and manually guiding the robot&#x02019;s arm. We realize two experiments on the real robot: one with simple reaching trajectories, and one inspired by collaborative object sorting. The software implementing our approach is open source and available on the GitHub platform. In addition, we provide tutorials and videos.</p>
</abstract>
<kwd-group>
<kwd>robot</kwd>
<kwd>prediction</kwd>
<kwd>intention</kwd>
<kwd>interaction</kwd>
<kwd>probabilistic models</kwd>
</kwd-group>
<counts>
<fig-count count="14"/>
<table-count count="2"/>
<equation-count count="35"/>
<ref-count count="76"/>
<page-count count="27"/>
<word-count count="21026"/>
</counts>
</article-meta>
</front>
<body>
<sec id="S1" sec-type="introduction">
<label>1</label> <title>Introduction</title>
<p>A critical ability for robots to collaborate with humans is to predict the intention of the partner. For example, a robot could help a human fold sheets, move furniture in a room, lift heavy objects, or place wind shields on a car frame. In all these cases, the human could begin the collaborative movement by guiding the robot, or by leading the movement in the case that both human and robot hold the object. It would be beneficial for the performance of the task if the robot could infer the intention of the human as soon as possible and collaborate to complete the task without requiring any further assistance. This scenario is particularly relevant for manufacturing (Dumora et al., <xref ref-type="bibr" rid="B21">2013</xref>), where robots could help human partners in carrying a heavy or unwieldy object, while humans could guide the robot without effort in executing the correct trajectory for positioning the object at the right location.<xref ref-type="fn" rid="fn1"><sup>1</sup></xref>
For example, the human could start moving the robot&#x02019;s end effector toward the goal location and release the grasp on the robot when the robot shows that it is capable of reaching the desired goal location without human intervention. Service and manufacturing scenarios offer a wide set of examples where collaborative actions can be initiated by the human and finished by the robot: assembling objects parts, sorting items in the correct bins or trays, welding, moving objects together, etc. In all these cases, the robot should be able to predict the goal of each action and the trajectory that the human partner wants to do for each action. To make this prediction, the robot should use all available information coming from sensor readings, past experiences (prior), human imitation and previous teaching sessions, or collaborations. Understanding and modeling the human behavior, exploiting all the available information, is the key to tackle this problem (Sato et al., <xref ref-type="bibr" rid="B63">1994</xref>).</p>
<p>To predict the human intention, the robot must identify the current task, predict the user&#x02019;s goal, and predict the trajectory to achieve this goal. In the human&#x02013;robot interaction literature, many keywords are associated with this prediction ability: inference, goal estimation, legibility, intention recognition, and anticipation.</p>
<p>Anticipation is the ability of the robot to choose the right thing to do in a current situation (Hoffman, <xref ref-type="bibr" rid="B31">2010</xref>). To achieve this goal, the robot must predict the effect of their action, as studied with the concept of affordances (Sahin et al., <xref ref-type="bibr" rid="B62">2007</xref>; Ivaldi et al., <xref ref-type="bibr" rid="B35">2014b</xref>; Jamone et al., <xref ref-type="bibr" rid="B39">2017</xref>). It also must predict the human intention, which means estimating the partner&#x02019;s goal (Wang et al., <xref ref-type="bibr" rid="B75">2013</xref>; Thill and Ziemke, <xref ref-type="bibr" rid="B72">2017</xref>). Finally, it must be able to predict the future events or states, e.g., being able to simulate the evolution of the coupled human&#x02013;robot system, as it is frequently done in model predictive control (Ivaldi et al., <xref ref-type="bibr" rid="B36">2010</xref>; Zube et al., <xref ref-type="bibr" rid="B76">2016</xref>) or in human-aware planning (Alami et al., <xref ref-type="bibr" rid="B1">2006</xref>; Shah et al., <xref ref-type="bibr" rid="B66">2011</xref>).</p>
<p>It has been posited that having legible motions (Dragan and Srinivasa, <xref ref-type="bibr" rid="B19">2013</xref>; Busch et al., <xref ref-type="bibr" rid="B6">2017</xref>) helps the interacting partners in increasing the mutual estimation of the partner&#x02019;s intention, increasing the efficiency of the collaboration.</p>
<p>Anticipation requires thus the ability to visualize or predict the future desired state, e.g., where the human intends to go to. Predicting the user intention is often formulated as predicting the target of the human action, meaning that the robot must be able to predict at least the goal of the human when the two partners engage in a joint reaching action. To make such prediction, a common approach is to consider each movement as an instance of a particular skill or goal-directed movement primitive.</p>
<p>In the past decade, several frameworks have been proposed to represent movements primitives, frequently called <italic>skills</italic>, the most notable being Gaussian Mixture Models (GMM) (Khansari-Zadeh and Billard, <xref ref-type="bibr" rid="B43">2011</xref>; Calinon et al., <xref ref-type="bibr" rid="B10">2014</xref>), Dynamic Movement Primitives (DMP) (Ijspeert et al., <xref ref-type="bibr" rid="B33">2013</xref>), Probabilistic Dynamic Movement Primitive (PDMP) (Meier and Schaal, <xref ref-type="bibr" rid="B51">2016</xref>), and Probabilistic Movement Primitives (ProMP) (Paraschos et al., <xref ref-type="bibr" rid="B55">2013a</xref>). For a thorough review of the literature, we refer the interested reader to Peters et al. (<xref ref-type="bibr" rid="B59">2016</xref>). Skill learning techniques have been applied to several learning scenarios, such as playing table tennis, writing digits, and avoiding obstacles during pick and place motions. In all these scenarios, the humans are classically providing the demonstrations (i.e., realizations of the task trajectories) by either manually driving the robot or through teleoperation, following the classical paradigm of imitation learning. Some of them have been also applied to the iCub humanoid robot: for example, Stulp et al. (<xref ref-type="bibr" rid="B71">2013</xref>) used DMPs to adapt a reaching motion online to the variable obstacles encountered by the robot arm, while Paraschos et al. (<xref ref-type="bibr" rid="B57">2015</xref>) used ProMPs to learn how to tilt a grate including torque information.</p>
<p>Among the aforementioned techniques, ProMPs stand out as one of the most promising techniques for realizing intention recognition and anticipatory movements for human&#x02013;robot collaboration. They have the advantage, with respect to the other methods, of capturing by design the variability of the human demonstrations. They also have useful structural properties, as described by Paraschos et al. (<xref ref-type="bibr" rid="B55">2013a</xref>), such as co-activation, coupling, and temporal scaling. ProMPs have already been used in human&#x02013;robot coordination for generating appropriate robot trajectories in response to initiated human trajectories (Maeda et al., <xref ref-type="bibr" rid="B50">2016</xref>). Differently from DMPs, ProMPs do not need the information about the final goal of the trajectory, which is something that DMPs use to set an attractor that guarantees convergence to the final goal.<xref ref-type="fn" rid="fn2"><sup>2</sup></xref> Also, they perform better in presence of noisy measurements or sparse measurements, as discussed in Maeda et al. (<xref ref-type="bibr" rid="B49">2014</xref>).<xref ref-type="fn" rid="fn3"><sup>3</sup></xref> In a recent paper, Meier and Schaal (<xref ref-type="bibr" rid="B51">2016</xref>) proposed a method called PDMP (Probabilistic Dynamic Movement Primitive). This method improves DMP with probabilistic properties to measure the likelihood that the movement primitive is executed correctly and to perform inference on sensor measurement. However, The PDMPs do not have a data-driven generalization and can deviate arbitrarily from the demonstrations. These last differences can be critical for our humanoid robot (for example, if it collides with something during the movement, or if during the movement it holds something that can fall down due to a bad trajectory, etc.). Thus, the ProMPs method is more suitable for our applications.</p>
<p>In this article, we present our approach to the problem of predicting the intention during human&#x02013;robot physical interaction and collaboration, based on Probabilistic Movement Primitives (ProMPs) (Paraschos et al., <xref ref-type="bibr" rid="B55">2013a</xref>), and we present the associated open-source software code that implements the method for the iCub.</p>
<p>To illustrate the technique, the exemplifying problem we tackle in this article is to allow the robot to finish a movement initiated by the user that physically guides the robot arm. From the first observations of the joint movement, supposedly belonging to a movement primitive of some task, the robot must recognize which kind of task the human is doing, predict the &#x0201C;future&#x0201D; trajectory, and complete the movement autonomously when the human releases the grasp on the robot.<xref ref-type="fn" rid="fn4"><sup>4</sup></xref></p>
<p>To achieve this goal, the robot first learns the movement primitives associated with the different actions/tasks. We choose to describe these primitives with ProMPs, as they are able to capture the distribution of demonstrations in a probabilistic model, rather than with a unique &#x0201C;average&#x0201D; trajectory. During interaction, the human starts physically driving the robot to perform the desired task. At the same time, the robot collects observations of the task. It then uses the prior information from the ProMP to compute a prediction of the desired goal together with the &#x0201C;future&#x0201D; trajectory that allows it to reach the goal.</p>
<p>A conceptual representation of the problem is shown in Figure <xref ref-type="fig" rid="F1">1</xref>. In the upper part of this figure, we represent the training step for one movement primitive: the robot is guided by the human partner to perform a certain task, and several entire demonstrations of the movement that realizes the task are collected. Both kinematics (e.g., Cartesian positions) and dynamics (e.g., wrenches) information are collected. The <italic>N</italic> trajectories constitute the base for learning the primitive, that is learning the parameters <bold><italic>&#x003C9;</italic></bold> of the trajectory distribution. We call this learned distribution the <italic>prior distribution</italic>. If multiple tasks are to be considered, then the process is replicated such that we have one ProMP for every task. The bottom of the figure represents the inference step. From the <italic>early observations</italic><xref ref-type="fn" rid="fn5"><sup>5</sup></xref> of a movement initiated by the human partner, the robot first recognizes which ProMP best matches the early observations (i.e., it recognizes the primitives that the human is executing, among the set of known primitives). Then, it estimates the future trajectory, given the early observations (e.g., first portion of a movement) and the prior distribution, computing the parameters <bold><italic>&#x003C9;</italic></bold><sup>&#x0002A;</sup> of the <italic>posterior distribution</italic>. The corresponding trajectory can be used by the robot to autonomously finish the movement, without relying on the human.</p>
<fig position="float" id="F1">
<label>Figure 1</label>
<caption><p>Conceptual use of the ProMP for predicting the desired trajectory to be performed by the robot in a collaborative task. Top: training phase, where ProMPs are learned from several human demonstrations. Bottom: inference phase (online), where from early observations, the robot recognizes the current (among the known) ProMP and predicts the human intention, i.e., the future evolution of the initiated trajectory.</p></caption>
<graphic xlink:href="frobt-04-00045-g001.tif"/>
</fig>
<p>In this article, we describe both the theoretical framework and the software that is used to perform this prediction. The software is currently implemented in Matlab and C&#x0002B;&#x0002B;; it is open source, available on <monospace>github</monospace>:</p>
<p><uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories">https://github.com/inria-larsen/icubLearningTrajectories</uri></p>
<p>and it has been tested both with a simulated iCub in Gazebo and the real iCub. In simulation, physical guidance is provided by the Geomagic Touch<xref ref-type="fn" rid="fn6"><sup>6</sup></xref>; on the real robot, the human operator simply grabs the robot&#x02019;s forearm.</p>
<p>We also provide a practical example of the software that realizes the exemplifying problems. In the example, the recorded trajectory is composed of both the Cartesian position and the forces at the end effector. Notably, in previous studies (Paraschos et al., <xref ref-type="bibr" rid="B57">2015</xref>), ProMPs were used to learn movement primitives using joint positions. Here, we use Cartesian positions instead of joints positions to exploit the redundancy of the robotic arm in performing the desired task in the 3D space. At the control level of the iCub, this choice requires the iCub to control its lower-level (joint torque) movement with the Cartesian controller (Pattacini et al., <xref ref-type="bibr" rid="B58">2010</xref>) instead of using the direct control at joint level. As for the forces, we rely on a model-based dynamics estimation that exploits the 6 axis force/torque sensors (Ivaldi et al., <xref ref-type="bibr" rid="B37">2011</xref>; Fumagalli et al., <xref ref-type="bibr" rid="B28">2012</xref>). All details for the experiments are presented in the article and the software tutorial.</p>
<p>To summarize, the contributions of this article are as follows:
<list list-type="bullet">
<list-item><p>the description of a theoretical framework based on ProMPs for predicting the human desired trajectory and goal during physical human&#x02013;robot interaction, providing the following features: recognition of the current task, estimation of the task duration, and prediction of the future trajectory;</p></list-item>
<list-item><p>an experimental study about how multimodal information can be used to improve the estimation of the duration/speed of an initiated trajectory;</p></list-item>
<list-item><p>the open-source software to realize an intention recognition application with the iCub robot, both in simulation and on the real robot.</p></list-item>
</list></p>
<p>The article is organized as follows. In Section <xref ref-type="sec" rid="S2">2</xref>, we review the literature about intentions in Human&#x02013;Robot Interaction (HRI), probabilistic models for motion primitives, and their related software. In Section <xref ref-type="sec" rid="S3">3</xref>, we describe the theoretical tools that we use to formalize the problem of predicting the intention of the human during interaction. Particularly, we describe the ProMPs and their use for predicting the evolution of a trajectory given early observations. In Section <xref ref-type="sec" rid="S4">4</xref>, we overview the software organization and the interconnection between our software and the iCub&#x02019;s main software, both for the real and simulated robot. The following sections are devoted to presenting our software and its use for predicting intention. We choose to present three examples of increasing complexity, with the simulated and real robot. We provide and explain in detail a software example for a 1-DOF trajectory in Section <xref ref-type="sec" rid="S5">5</xref>. In Sections <xref ref-type="sec" rid="S6">6</xref> and <xref ref-type="sec" rid="S7">7</xref>, we present the intention recognition application with the simulated and real iCub, respectively. In the first examples with the robot, the &#x0201C;tasks&#x0201D; are exemplified by simple reaching movements, to provide simple and clear trajectories that help the reader understand the method, whereas the last experiment with the robot is a collaborative object sorting task. Section <xref ref-type="sec" rid="S8">8</xref> provides the links to the videos showing how to use the software in simulation and on the iCub. Finally, in Section <xref ref-type="sec" rid="S10">10</xref>, we discuss our approach and its limitations and outline our future developments.</p>
</sec>
<sec id="S2">
<label>2</label> <title>Related Work</title>
<p>In this article, we propose a method to recognize the intention of the human partner collaborating with the robot, formalized as the target and the &#x0201C;future&#x0201D; trajectory associated with a skill, modeled by a goal-directed Probabilistic Movement Primitive. In this section, we briefly overview the literature about intention recognition in human&#x02013;robot interaction and motion primitives for learning of goal-directed robotic skills.</p>
<sec id="S2-1">
<label>2.1</label> <title>Intention during Human&#x02013;Robot Interaction</title>
<p>When humans and robots collaborate, mutual understanding is paramount for the success of any shared task. Mutual understanding means that the human is aware of the robot&#x02019;s current task, status, goal, available information, that he/she can reasonably predict or expect what it will do next, and <italic>vice versa</italic>. Recognizing the intention is only one piece of the problem but still plays a crucial part for providing anticipatory capabilities.</p>
<p>Formalizing intention can be a daunting task, as one may find it difficult to provide a unique representation that explains the intention for very low-level goal-directed tasks (e.g., reaching a target object and grasping it) and for very high-level, complex, abstract or cognitive tasks (e.g., change a light bulb on the ceiling&#x02014;by building a stair composed of many parts, climbing it and reaching the light bulb on the ceiling, etc.). Demiris (<xref ref-type="bibr" rid="B16">2007</xref>) reviews different approaches of action recognition and intention prediction.</p>
<p>From the human&#x02019;s point of view, understanding the robot&#x02019;s intention means that the human should find intuitive and non-ambiguous every goal-directed robot movement or actions, and it should be clear what the robot is doing or going to do (Kim et al., <xref ref-type="bibr" rid="B45">2017</xref>). Dragan and Srinivasa (<xref ref-type="bibr" rid="B20">2014</xref>) formalized the difference between <italic>predictability</italic> and <italic>legibility</italic>: a motion is legible if an observer can quickly infer its goal, while a motion is predictable when it matches the expectations of the observer given its goal.</p>
<p>The problem of generating <italic>legible</italic> motions for robots has been addressed in many recent works. For example, Dragan and Srinivasa (<xref ref-type="bibr" rid="B20">2014</xref>) use optimization techniques to generate movements that are predictable and legible. Huang et al. (<xref ref-type="bibr" rid="B32">2017</xref>) apply an Inverse Reinforcement Learning method on autonomous cars to select the robot movements that are maximally informative for the humans and that will facilitate their inference of the robot&#x02019;s objectives.</p>
<p>From the robot&#x02019;s point of view, understanding the human&#x02019;s intention means that the robot should be able to decipher the ensemble of verbal and non-verbal cues that the human naturally generates with his/her behavior, to identify, for a current task and context, what is the human intention. The more information (e.g., measurable signals from the human and the environment) is used, the better and more complex the estimation can be.</p>
<p>The simplest form of intention recognition is to estimate the goal of the current action, under the implicit assumption that each action is a goal-directed movement.</p>
<p>Sciutti et al. (<xref ref-type="bibr" rid="B65">2013</xref>) showed that humans implicitly attribute intentions in form of goals to robot motions, proving that humans exhibit anticipatory gaze toward the intended goal. Gaze was also used by Ivaldi et al. (<xref ref-type="bibr" rid="B34">2014a</xref>) in a human&#x02013;robot interaction game with iCub, where the robot (human) was tracking the human (robot) gaze to identify the target object. Ferrer and Sanfeliu (<xref ref-type="bibr" rid="B25">2014</xref>) proposed the Bayesian Human Motion Intentionality Prediction algorithm, to geometrically compute the most likely target of the human motion, using Expectation&#x02013;Maximization and a simple Bayesian classifier. In Wang et al. (<xref ref-type="bibr" rid="B74">2012</xref>), a method called Intention-Driven Dynamics model, based on Gaussian Process Dynamical Models (GPDM) (Wang et al., <xref ref-type="bibr" rid="B73">2005</xref>), is used to infer the intention of the robot&#x02019;s partner during a ping-pong match, represented by the target of the ball, by analyzing the entire human movement before the human hits the ball. More generally, modeling and descriptive approaches can be used to match predefined labels with measured data (Csibra and Gergely, <xref ref-type="bibr" rid="B15">2007</xref>).</p>
<p>A more complex form of intention recognition is to estimate the future trajectory from the past observations. In a sense, to estimate <inline-formula><mml:math id="M1"><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">future</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">past</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>. This problem, very similar to the estimate of the forward dynamics model of a system, is frequently addressed by researchers in model predictive control, where being able to &#x0201C;play&#x0201D; the system evolving in time is the basis for computing appropriate robot controls. When a trajectory can be predicted by an observer from early observations of it, we can say that the trajectory is not only <italic>legible</italic>, but <italic>predictable</italic>. A systematic approach for predicting a trajectory is to reason in terms of movement primitives, in such a way that the sequence of points of the trajectory can be generated by a parametrized time model or a parametrized dynamical system. For example, Palinko et al. (<xref ref-type="bibr" rid="B54">2014</xref>) plan reaching trajectories for object carrying that are able to convey information about the weight of the transported object. More generally, in generative approaches (Buxton, <xref ref-type="bibr" rid="B7">2003</xref>), latent variables are used to learn models for the primitives, both to generate and infer actions. The next subsection will provide more detail about the state-of-the-art techniques for generating movement primitives.</p>
<p>In Amor et al. (<xref ref-type="bibr" rid="B2">2014</xref>), the robot first learns Interaction Primitives by watching two humans performing an interactive task, using motion capture. The Interaction Primitive encapsulates the dependencies between the two human movements. Then, the robot uses the Interaction Primitive to adapt its behavior to its partner&#x02019;s movement. Their method is based on Dynamics Motor Primitives (Ijspeert et al., <xref ref-type="bibr" rid="B33">2013</xref>), where a distribution over the DMP&#x02019;s parameters is learned. Notably, in this article, we did not follow the same approach to learn Interaction Primitives, since there is a physical interaction that makes the user&#x02019;s and the robot&#x02019;s movements as one joint movements. Moreover, there is no latency between the partner&#x02019;s early movement and the robot&#x02019;s, because the robot&#x02019;s arm is physically driven by the human until the latter breaks the contact.</p>
<p>Indeed, most examples in the literature focus on kinematic trajectories, corresponding to gestures that are typically used in dyadic interactions characterized by a coordination of actions and reactions. Whenever the human and robot are also interacting physically, collaborating on a task with some exchange of forces, then the problem of intention recognition becomes more complex. Indeed, the kinematics information provided by the &#x0201C;trajectories&#x0201D; cannot be analyzed without taking into account the haptic exchange and the estimation of the &#x0201C;roles&#x0201D; of the partners in leading/following each other.</p>
<p>Estimating the current role of the human (master/slave or leader/follower) is crucial, as the role information is necessary to coherently adapt the robot&#x02019;s compliance and impedance at the level of the exchanged contact forces. Most importantly, adapting the haptic interaction can be used by the robot to communicate when it has understood the human intent and is able to finish the task autonomously, mimicking the same type of implicit non-verbal communication that is typical of humans.</p>
<p>For example, in Gribovskaya et al. (<xref ref-type="bibr" rid="B29">2011</xref>), the robot infers the human intention utilizing the measure of the human&#x02019;s forces and by using Gaussian Mixture Models. In Rozo Casta&#x000F1;eda et al. (<xref ref-type="bibr" rid="B61">2013</xref>), the arm impedance is adapted by a Gaussian Mixture Model based on measured forces and visual information. Many studies focused on the robot&#x02019;s ability to act only when and how its user wants (Carlson and Demiris, <xref ref-type="bibr" rid="B13">2008</xref>; Soh and Demiris, <xref ref-type="bibr" rid="B69">2015</xref>) and to not interfere with the partner&#x02019;s forces (Jarrass&#x000E9; et al., <xref ref-type="bibr" rid="B40">2008</xref>) or actions (Baraglia et al., <xref ref-type="bibr" rid="B3">2016</xref>).</p>
<p>In this article, we describe our approach to the problem of recognizing the human intention during collaboration by providing an estimate of the future intended trajectory to be performed by the robot. In our experiments, the robot does not adapt its role during the physical interaction but simply switches from follower to leader when the human breaks contact with it.</p>
</sec>
<sec id="S2-2">
<label>2.2</label> <title>Movement Primitives</title>
<p>Movement Primitives (MPs) are a well established paradigm for representing complex motor skills. The most known method for representing movement primitives is probably the Dynamic Movement Primitives (DMPs) (Schaal, <xref ref-type="bibr" rid="B64">2006</xref>; Ijspeert et al., <xref ref-type="bibr" rid="B33">2013</xref>; Meier and Schaal, <xref ref-type="bibr" rid="B51">2016</xref>). DMPs use a stable non-linear attractor in combination with a forcing term to represent the movement. The forcing term enables to follow specific movement, while the attractor asserts asymptotic stability. In a recent paper, Meier and Schaal (<xref ref-type="bibr" rid="B51">2016</xref>) proposed an extension to DMPs, called PDMP (Probabilistic Dynamic Movement Primitive). This method improves DMP with probabilistic properties to measure the likelihood that the movement primitive is executed correctly and to perform inference on sensor measurement. However, the PDMPs do not have a data-driven generalization and can deviate arbitrarily from the demonstrations. This last difference can be critical for our applications with the humanoid robot iCub, since uncertainties are unavoidable and disturbances may happen frequently and destabilize the robot movement (for example, an unexpected collision during the movement). Thus, the ProMPs method is more accurate for our software.</p>
<p>Ewerton et al. (<xref ref-type="bibr" rid="B24">2015</xref>), Paraschos et al. (<xref ref-type="bibr" rid="B56">2013b</xref>), and Maeda et al. (<xref ref-type="bibr" rid="B49">2014</xref>) compared ProMPs and DMPs for learning primitives and specifically interaction primitives. With the DMP model, at the end of the movement, only a dynamic attractor is activated. Thus, it always reaches a stable goal. The properties allowed by both methods are temporal scaling of the movement, learning from a single demonstration, and generalizing to new final position. With ProMPs, we have in addition the ability to do inference (thanks to the distribution), to force the robot to pass by several initial via points (the early observations), to know the correlation between the input of the model, and to co-activate some ProMPs. In our study, we need these features, because the robot must determine a trajectory that passes by the early observations (beginning of the movement where the user guides physically the robot).</p>
<p>A Recurrent Neural Networks (RNN) approach (Billard and Mataric, <xref ref-type="bibr" rid="B4">2001</xref>) used a hierarchy of neural networks to simulate the activation of areas in human brain. The network can be trained to infer the state of the robot at the next point in time, given the current state. The authors propose to train the RNN by minimizing the error between the inferred position of the next time step and the ground truth obtained from demonstrations.</p>
<p>Hidden Markov Models (HMMs) for movement skills were introduced by Fine et al. (<xref ref-type="bibr" rid="B26">1998</xref>). This method is often used to categorize movements, where a category represents a movement primitive. This method also allows to represent the temporal sequence of a movement. In Nguyen et al. (<xref ref-type="bibr" rid="B53">2005</xref>), they use learned Hierarchical Hidden Markov Model (HHMMs) to recognize human behaviors efficiently. In Ren and Xu (<xref ref-type="bibr" rid="B60">2002</xref>), they present the Primitive-based Coupled-HMM (CHMM) approach, for human natural complex action recognition. In this approach, each primitive is represented by a Gaussian Mixture Model.</p>
<p>Adapting Gaussian Mixture Models is another method used to learn physical interaction with learning. In Evrard et al. (<xref ref-type="bibr" rid="B22">2009</xref>), they use GMMs and Gaussian Mixture Regression to learn, in addition to the position (joint information), force information. Using this method, a humanoid robot is able to collaborate in one dimension with its partner for a lifting task. In this article, we will also use (Cartesian) position and force information to allow our robot to interact physically with its partner.</p>
<p>A subproblem of movement recognition is that robots need to estimate the duration of the trajectory to align a current trajectory with learned movements. In our case, at the beginning of the physical Human&#x02013;Robot Interaction (pHRI), the robot observes a partial movement guided by its user. Given this partial movement, the robot must first estimate what the current state of the movement is to understand what its partner intent is. Thus, it needs to estimate the partial movement&#x02019;s speed.</p>
<p>Fitts&#x02019; law models the movement duration for goal-directed movements. This model is based on the assumption that the movement duration is a linear function of the difficulty to achieve a target (Fitts, <xref ref-type="bibr" rid="B27">1992</xref>). In Langolf et al. (<xref ref-type="bibr" rid="B46">1976</xref>), they show that by modifying the target&#x02019;s width, the shape of the movement changes. Thus, it is difficult to apply Fitt&#x02019;s law when the size of the target can change. In Langolf et al. (<xref ref-type="bibr" rid="B46">1976</xref>) and Soechting (<xref ref-type="bibr" rid="B68">1984</xref>), they confirm this idea by showing that the shape of the movement changes with the accuracy required by the goal position of the movement.</p>
<p>Dynamics Time Warping (DTW) is a method to find the correlation between two trajectories that have different durations, in a more robust way than the Euclidean distance. In Amor et al. (<xref ref-type="bibr" rid="B2">2014</xref>), they modify the DTW algorithm to match a partial movement with a reference movement. Many improvements over this method exist. In Keogh (<xref ref-type="bibr" rid="B41">2002</xref>), they propose a robust method to improve the indexation. The calculation speed of DTW is improved using different methods, such as FastDTW, Lucky Time Warping, or FTW. An explanation and comparison of these methods are presented in Silva and Batista (<xref ref-type="bibr" rid="B67">2016</xref>), where they add their own computation speed improvement by using a method called Pruned Warping Paths. This method allows the deletion of unlikely data. However, a drawback of this well-known DTW method is they do not preserve the global trajectory&#x02019;s shape.</p>
<p>In Maeda et al. (<xref ref-type="bibr" rid="B49">2014</xref>), where they use a probabilistic learning of movement primitives, they improve the duration estimation of movements by using a different time warping method. This method is based on a Gaussian basis model to represent a time warping function and, instead of DTW, it forces a local alignment between the two movements without &#x0201C;jumping&#x0201D; some index. Thus, the resulting trajectories are more realistic, smoother, and this method preserves the global trajectories&#x02019; shapes.</p>
<p>For inferring the intention of the robot&#x02019;s partner, we use Probabilistic Movement Primitives (ProMPs) (Paraschos et al., <xref ref-type="bibr" rid="B55">2013a</xref>). Specifically, we use the ProMP&#x02019;s conditioning operator to adapt the learned skills according to observations. The ProMPs can encode the correlations between forces and positions and allow better prediction of the partner&#x02019;s intention. Further, the phase of the partner&#x02019;s movement can be inferred, and therefore the robot can adapt to the partner&#x02019;s velocity changes. ProMPs are more efficient for collaborative tasks, as shown in Maeda et al. (<xref ref-type="bibr" rid="B49">2014</xref>), where in comparison to DMPs, the root-mean square error of the predictions is lower.</p>
</sec>
<sec id="S2-3">
<label>2.3</label> <title>Related Open-Source Software</title>
<p>One of the goals of this article is to introduce an open-source software for the iCub (but potentially for any other robot), where the ProMP method is used to recognize human intention during collaboration, so that the robot can execute initiated actions autonomously. This is not the first open-source implementation for representing movement primitives: however, it has a novel application and a rationale that makes it easy to use with the iCub robot.</p>
<p>In Table <xref ref-type="table" rid="T1">1</xref>, we report on the main software libraries that one can use to learn movement primitives. Some have been also used to realize learning applications with iCub, e.g., Lober et al. (<xref ref-type="bibr" rid="B48">2014</xref>) and Stulp et al. (<xref ref-type="bibr" rid="B71">2013</xref>) or to recognize human intention. However, the software we propose here is different: it provides an implementation of ProMPs used explicitly for intention recognition and prediction of intended trajectories. It is interfaced with iCub, both real and simulated, and addresses in the specific case of physical interaction between the human and the robot. In short, it is a first step toward adding intention recognition ability to the iCub robot.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Open-source software libraries implementing movement primitives and their application to different known robots.</p></caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left">Software/library</th>
<th align="left">Method</th>
<th align="left">Code link</th>
<th align="left">Language</th>
<th align="left">Robot</th>
<th align="left">Reference</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Dynamical System Modulation for Robot Adaptive Learning via Kinesthetic Demonstrations</td>
<td align="left">GMR</td>
<td align="left">Hersch et al. (<xref ref-type="bibr" rid="B30">2008</xref>)</td>
<td align="left">Matlab</td>
<td align="left">Hoap3</td>
<td align="left">Micha and Aude (<xref ref-type="bibr" rid="B52">2008</xref>)</td>
</tr>
<tr>
<td align="left">pbdlib-matlab</td>
<td align="left">HMM, GMM, and others</td>
<td align="left">Calinon (<xref ref-type="bibr" rid="B8">2015</xref>)</td>
<td align="left">Matlab</td>
<td align="left">Baxter</td>
<td align="left">Calinon (<xref ref-type="bibr" rid="B9">2016</xref>)</td>
</tr>
<tr>
<td align="left">DMP learning with GMR</td>
<td align="left">DMP and GMR</td>
<td align="left">Calinon et al. (<xref ref-type="bibr" rid="B11">2012a</xref>)</td>
<td align="left">Matlab or C</td>
<td align="left">Coman</td>
<td align="left">Calinon et al. (<xref ref-type="bibr" rid="B12">2012b</xref>)</td>
</tr>
<tr>
<td align="left">Stochastic Machine Learning Toolbox</td>
<td align="left">Kernel Functions, Gaussian Processes, Bayesian Optimization</td>
<td align="left">Lober (<xref ref-type="bibr" rid="B47">2014</xref>)</td>
<td align="left">C&#x0002B;&#x0002B; or Python</td>
<td align="left">&#x02013;</td>
<td align="left"/>
</tr>
<tr>
<td align="left">pydmps</td>
<td align="left">DMP</td>
<td align="left">DeWolf (<xref ref-type="bibr" rid="B18">2013</xref>)</td>
<td align="left">Python</td>
<td align="left">Sarcos</td>
<td align="left">Ijspeert et al. (<xref ref-type="bibr" rid="B33">2013</xref>)</td>
</tr>
<tr>
<td align="left">Dynamical Systems approach to Learn Robot Motions</td>
<td align="left">GMM and SEDS</td>
<td align="left">Khansari (<xref ref-type="bibr" rid="B42">2011</xref>)</td>
<td align="left">Matlab</td>
<td align="left">iCub</td>
<td align="left">Khansari-Zadeh and Billard (<xref ref-type="bibr" rid="B43">2011</xref>, <xref ref-type="bibr" rid="B44">2012</xref>)</td>
</tr>
<tr>
<td align="left">Function Approximation, DMP, and Black-Box Optimization (dmpbbo)</td>
<td align="left">DMP</td>
<td align="left">Stulp (<xref ref-type="bibr" rid="B70">2014</xref>)</td>
<td align="left">Python or C&#x0002B;&#x0002B;</td>
<td align="left">iCub</td>
<td align="left">Stulp et al. (<xref ref-type="bibr" rid="B71">2013</xref>), Lober et al. (<xref ref-type="bibr" rid="B48">2014</xref>)</td>
</tr>
<tr>
<td align="left">Learning Motor Skills from Partially Observed Movements Executed at Different Speeds</td>
<td align="left">ProMP</td>
<td align="left">Ewerton (<xref ref-type="bibr" rid="B23">2016</xref>)</td>
<td align="left">Matlab or Python</td>
<td align="left">&#x02013;</td>
<td align="left">Ewerton et al. (<xref ref-type="bibr" rid="B24">2015</xref>)</td>
</tr>
<tr>
<td align="left">icubLearningTrajectories</td>
<td align="left">ProMP</td>
<td align="left">Dermy (<xref ref-type="bibr" rid="B17">2017</xref>)</td>
<td align="left">Matlab and C&#x0002B;&#x0002B;</td>
<td align="left">iCub</td>
<td align="left">&#x02013;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="S3">
<label>3</label> <title>Theoretical Framework</title>
<p>In this section, we present the theoretical framework that we use to tackle the problem of intent recognition: we describe the ProMPs and how they can be used to predict trajectories from early observations.</p>
<p>In Section <xref ref-type="sec" rid="S2">2</xref>, we formulate the problem of learning a primitive for a simple case, where the robot learns the distribution from several demonstrated trajectories. In Section <xref ref-type="sec" rid="S3-6">3.3</xref>, we formulate and provide the solution to the problem of predicting the &#x0201C;future&#x0201D; trajectory from early observations (i.e., the initial data points). In Section <xref ref-type="sec" rid="S3-7">3.4</xref>, we discuss the problem of predicting the time modulation, i.e., predicting the global duration of the predicted trajectory. This problem is non-trivial, as by construction the demonstrated trajectories are &#x0201C;normalized&#x0201D; in duration when the ProMP is learned.<xref ref-type="fn" rid="fn7"><sup>7</sup></xref> In Section <xref ref-type="sec" rid="S3-8">3.5</xref>, we explain how to recognize, from the early observations, to which of many known skills (modeled by ProMPs) the current trajectory belongs. In all these sections, we tried to present the theoretical aspects related to the use of ProMPs for the intention recognition application.</p>
<p>Practical examples of these theoretical problems are presented and explained later in sections <xref ref-type="sec" rid="S5">5</xref>&#x02013;<xref ref-type="sec" rid="S7">7</xref>. Section <xref ref-type="sec" rid="S5">5</xref> explains how to use our software, introduced in Section <xref ref-type="sec" rid="S4">4</xref>, for learning one ProMP for a simple set of 1-DOF trajectories. Section <xref ref-type="sec" rid="S6">6</xref> presents an example with the simulated iCub in Gazebo, while Section <xref ref-type="sec" rid="S7">7</xref> presents an example with the real iCub.</p>
<sec id="S3-4">
<label>3.1</label> <title>Notation</title>
<p>To facilitate understanding of the theoretical framework, we first introduce the notations we use in this section and throughout the remainder of the article.</p>
<sec id="S3-4-1">
<label>3.1.1</label> <title>Trajectories</title>
<list list-type="bullet">
<list-item><p><inline-formula><mml:math id="M2"><mml:mi>X</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, <italic>X</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>x</italic>(<italic>t</italic>), <italic>y</italic>(<italic>t</italic>), <italic>z</italic>(<italic>t</italic>)]<sup>T</sup>: the x/y/z-axis Cartesian coordinate of the robot&#x02019;s end effector.</p></list-item>
<list-item><p><inline-formula><mml:math id="M3"><mml:mi>F</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mn>6</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, <italic>F</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>f<sub>x</sub></italic>, <italic>f<sub>y</sub></italic>, <italic>f<sub>z</sub></italic>, <italic>m<sub>x</sub></italic>, <italic>m<sub>y</sub></italic>, <italic>m<sub>z</sub></italic>]<sup>T</sup>: the wrench contact forces, i.e., the external forces and moments measured by the robot at the contact level (end effector).</p></list-item>
<list-item><p><inline-formula><mml:math id="M4"><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: the generic vector containing the current value or state of the trajectories at time <italic>t</italic>. It can be monodimensional (e.g., <italic>&#x003BE;</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>z</italic>(<italic>t</italic>)]), or multidimensional (e.g., <italic>&#x003BE;</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>X</italic>(<italic>t</italic>), <italic>F</italic>(<italic>t</italic>)]<sup>T</sup>), depending on the type of trajectories that we want to represent with the ProMP.</p></list-item>
<list-item><p><inline-formula><mml:math id="M5"><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msup></mml:math></inline-formula> is an entire trajectory, consisting of <italic>t<sub>f</sub></italic> samples or data points.</p></list-item>
<list-item><p><inline-formula><mml:math id="M6"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> is the <italic>i</italic>-th demonstration (trajectory) of a task, consisting of <italic>t<sub>fi</sub></italic> samples or data points.</p></list-item>
</list>
</sec>
<sec id="S3-4-2">
<label>3.1.2</label> <title>Movement Primitives</title>
<list list-type="bullet">
<list-item><p><italic>k</italic>&#x02009;&#x02208;&#x02009;[1 : <italic>K</italic>]: the <italic>k</italic>-th ProMP, among a set of <italic>K</italic> ProMPs that represent different tasks/actions.</p></list-item>
<list-item><p><italic>n<sub>k</sub></italic>: number of recorded trajectories for each ProMP.</p></list-item>
<list-item><p><inline-formula><mml:math id="M7"><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>: set of <italic>n<sub>k</sub></italic> trajectories for the <italic>k</italic>-th ProMP.</p></list-item>
<list-item><p><inline-formula><mml:math id="M8"><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the model of the trajectory with:
<list list-type="bullet">
<list-item><p><inline-formula><mml:math id="M9"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>0</mml:mn><mml:mo class="MathClass-punc">,</mml:mo><mml:mi>&#x003B2;</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>: expected trajectory noise.</p></list-item>
<list-item><p><inline-formula><mml:math id="M10"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x000D7;</mml:mo><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: radial basis functions (RBFs) used to model trajectories. It is a block diagonal matrix.
<list list-type="simple">
<list-item><label>&#x02013;</label> <p><italic>M</italic>: number of RBFs.</p></list-item>
<list-item><label>&#x02013;</label> <p><inline-formula><mml:math id="M11"><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">ji</mml:mtext></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mtext>&#x02009;</mml:mtext><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext>&#x02009;</mml:mtext><mml:mfrac><mml:mrow><mml:msup><mml:mrow><mml:mi>e</mml:mi></mml:mrow><mml:mrow><mml:mfrac><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>m</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msubsup><mml:mrow><mml:msup><mml:mrow><mml:mi>e</mml:mi></mml:mrow><mml:mrow><mml:mfrac><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>m</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:msup></mml:mrow></mml:mrow></mml:mfrac></mml:math></inline-formula>: <italic>i</italic>-th RBF for all inputs <italic>j</italic>&#x02009;&#x02208;&#x02009;[1&#x02009;:&#x02009;<italic>D</italic>].</p></list-item>
</list></p>
<p>It must be noted that the upper term comes from a Gaussian <inline-formula><mml:math id="M12"><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msqrt><mml:mrow><mml:mn>2</mml:mn><mml:mi>&#x003C0;</mml:mi><mml:mi>h</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac><mml:msup><mml:mrow><mml:mi>e</mml:mi></mml:mrow><mml:mrow><mml:mfrac><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:msup></mml:math></inline-formula>, where <italic>c<sub>i</sub></italic> and <italic>h</italic> are, respectively, the center and variance of the <italic>i</italic>-th Gaussian. In our RBF formulation, we normalize all the Gaussians.</p></list-item>
<list-item><p><inline-formula><mml:math id="M13"><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: time-independent parameter vector weighting the RBFs, i.e., the parameters to be learned.</p></list-item>
</list></p></list-item>
<list-item><p><inline-formula><mml:math id="M14"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>: normal distribution computed from a set <inline-formula><mml:math id="M15"><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>. It represents the distribution of the modeled trajectories, also called <italic>prior</italic> distribution.</p></list-item>
</list>
</sec>
<sec id="S3-4-3">
<label>3.1.3</label> <title>Time Modulation</title>
<list list-type="bullet">
<list-item><p><inline-formula><mml:math id="M16"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>: number of samples used as reference to rescale all the trajectories to the same duration.</p></list-item>
<list-item><p><inline-formula><mml:math id="M17"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x000D7;</mml:mo><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>: the RBFs rescaled to match the &#x0039E;<italic><sub>i</sub></italic> trajectory duration.</p></list-item>
<list-item><p><inline-formula><mml:math id="M18"><mml:msub><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:math></inline-formula>: temporal modulation parameter of the <italic>i</italic>-th trajectory.</p></list-item>
<list-item><p><inline-formula><mml:math id="M19"><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A8;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the model of the function mapping <inline-formula><mml:math id="M20"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> into the temporal modulation parameter <italic>&#x003B1;</italic>, with:
<list list-type="simple">
<list-item><label>&#x02013;</label> <p>&#x003A8;: a set of RBFs used to model the mapping between <inline-formula><mml:math id="M21"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> and <italic>&#x003B1;</italic>;</p></list-item>
<list-item><label>&#x02013;</label> <p><inline-formula><mml:math id="M22"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> is the variation of the trajectory during the first <italic>n<sub>o</sub></italic> observations (data points); it can be <inline-formula><mml:math id="M23"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> if the entire trajectory variables (e.g., Cartesian position and forces) are considered, or more simply <inline-formula><mml:math id="M24"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi>X</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>X</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> if only the variation in terms of Cartesian position is considered;</p></list-item>
<list-item><label>&#x02013;</label> <p><bold><italic>&#x003C9;</italic></bold><italic><sub>&#x003B1;</sub></italic>: the parameter vector weighting the RBFs of the &#x003A8; matrix.</p></list-item>
</list></p></list-item>
</list>
</sec>
<sec id="S3-4-4">
<label>3.1.4</label> <title>Inference</title>
<list list-type="bullet">
<list-item><p><inline-formula><mml:math id="M25"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>: early-trajectory observations, composed of <italic>n<sub>o</sub></italic> data points.</p></list-item>
<list-item><p><inline-formula><mml:math id="M26"><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>: noise of the initiated trajectory observation.</p></list-item>
<list-item><p><inline-formula><mml:math id="M27"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>: estimated time modulation parameter of a trajectory to infer.</p></list-item>
<list-item><p><inline-formula><mml:math id="M28"><mml:msub><mml:mrow><mml:mover accent='true'><mml:mi>t</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:mfrac></mml:math></inline-formula>: estimated duration of a trajectory to infer.</p></list-item>
<list-item><p><inline-formula><mml:math id="M29"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula>: ground truth of the trajectory for the robot to infer.</p></list-item>
<list-item><p><inline-formula><mml:math id="M30"><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>: the estimated trajectory.</p></list-item>
<list-item><p><inline-formula><mml:math id="M31"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mn>&#x003C3;</mml:mn></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>: posterior distribution of the parameter vector of a ProMP using the observation &#x0039E;<italic><sup>o</sup></italic>.</p></list-item>
<list-item><p><inline-formula><mml:math id="M32"><mml:mover accent='true'><mml:mi>k</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>: index of the recognized ProMP from the set of <italic>K</italic> known (previously learned) ProMPs.</p></list-item>
</list>
</sec>
</sec>
<sec id="S3-5">
<label>3.2</label> <title>Learning a Probabilistic Movement Primitive (ProMP) from Demonstrations</title>
<p>Our toolbox to learn, replay and infer the continuation of trajectories is written in Matlab and available at:
<list list-type="simple">
<list-item><p><uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories/tree/master/MatlabProgram">https://github.com/inria-larsen/icubLearningTrajectories/tree/master/MatlabProgram</uri></p></list-item></list></p>
<p>Let us assume the robot has recorded a set of <italic>n</italic><sub>1</sub> trajectories: <inline-formula><mml:math id="M33"><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>, where the <italic>i</italic>-th trajectory is <inline-formula><mml:math id="M34"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>. <italic>&#x003BE;</italic>(<italic>t</italic>) is the generic vector containing all the variables to be learned at time <italic>t</italic>, with the ProMP method. It can be monodimensional (e.g., <italic>&#x003BE;</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>z</italic>(<italic>t</italic>)] for the z-axis Cartesian coordinate), or multidimensional (e.g., <italic>&#x003BE;</italic>(<italic>t</italic>)&#x02009;&#x0003D;&#x02009;[<italic>X</italic>(<italic>t</italic>), <italic>F</italic>(<italic>t</italic>)]<sup>T</sup>). Note that the duration of each recorded trajectory (i.e., <inline-formula><mml:math id="M35"><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula>) may be variable. To find a common representation in terms of primitives, a time modulation is applied to all trajectories, such that they have the same number of samples <inline-formula><mml:math id="M36"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> (see details in Section 3.4). Such modulated trajectories are then used to learn a ProMP.</p>
<p>A ProMP is a Bayesian parametric model of the demonstrated trajectories in the following form:
<disp-formula id="E1"><label>(1)</label><mml:math id="M37"><mml:mi>&#x003BE;</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where <bold><italic>&#x003C9;</italic></bold>&#x02009;&#x02208;&#x02009;<italic>R<sup>M</sup></italic> is the time-independent parameter vector weighting the RBFs, <inline-formula><mml:math id="M38"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>0</mml:mn><mml:mo class="MathClass-punc">,</mml:mo><mml:mi>&#x003B2;</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> is the trajectory noise, and &#x003A6;<italic><sub>t</sub></italic> is a vector of <italic>M</italic> radial basis functions evaluated at time <italic>t</italic>:
<disp-formula id="E2"><mml:math id="M39"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">.</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></disp-formula>
with
<disp-formula id="E3"><label>(2)</label><mml:math id="M40"><mml:mfenced separators="" open="{" close=""><mml:mrow><mml:mtable equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow></mml:mfrac><mml:mtext mathvariant="italic">exp</mml:mtext><mml:mfenced separators="" open="{" close="}"><mml:mrow><mml:mfrac><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>c</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:mi>c</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>i</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi>i</mml:mi><mml:mo class="MathClass-bin">&#x02215;</mml:mo><mml:mi>M</mml:mi></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:mi>h</mml:mi></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn><mml:mo class="MathClass-bin">&#x02215;</mml:mo><mml:msup><mml:mrow><mml:mi>M</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></disp-formula></p>
<p>Note that all the &#x003C8; functions are scattered across time.</p>
<p>For each &#x0039E;<italic><sub>i</sub></italic> trajectory, we compute the <italic>&#x003C9;<sub>i</sub></italic> parameter vector to have <inline-formula><mml:math id="M41"><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. This vector is computed to minimize the error between the observed &#x003BE;<italic><sub>i</sub></italic>(<italic>t</italic>) trajectory and its model <inline-formula><mml:math id="M42"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. This is done using the Least Mean Square algorithm, i.e.:
<disp-formula id="E4"><label>(3)</label><mml:math id="M43"><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>To avoid the common issue of the matrix <inline-formula><mml:math id="M44"><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> in equation <xref ref-type="disp-formula" rid="E4">(3)</xref> not being invertible, we add a diagonal term and perform Ridge Regression:
<disp-formula id="E5"><label>(4)</label><mml:math id="M45"><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>&#x003BB;</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where <inline-formula><mml:math id="M46"><mml:mn>&#x003BB;</mml:mn><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mn>10</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>11</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:msub><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi><mml:mo class="MathClass-bin">&#x000D7;</mml:mo><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is a parameter that can be tuned by looking at the smallest singular value of the matrix <inline-formula><mml:math id="M47"><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>Thus, we obtain a set of these parameters: <inline-formula><mml:math id="M48"><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>, upon which a distribution is computed. Since we assume Normal distributions, we have:
<disp-formula id="E6"><label>(5)</label><mml:math id="M49"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mtd><mml:mtd class="align-even"><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E7"><label>(6)</label><mml:math id="M50"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.5em" class="nbsp" /><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:mfrac><mml:mrow><mml:mstyle displaystyle='true'><mml:munderover><mml:mo>&#x02211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:msub><mml:mi>&#x003C9;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mstyle></mml:mrow></mml:mstyle></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E8"><label>(7)</label><mml:math id="M51"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi mathvariant="normal">and</mml:mi><mml:mspace width="0.3em" class="nbsp" /><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mtd><mml:mtd class="align-even"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac><mml:mstyle displaystyle='true'><mml:munderover><mml:mrow><mml:mo class="MathClass-op">&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:munderover></mml:mstyle><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>The ProMP captures the distribution over the observed trajectories. To represent this movement primitive, we usually use the movement that passes by the mean of the distribution. Figure <xref ref-type="fig" rid="F2">2</xref> shows the ProMP for a 1-DOF lifting motion, with a number of reference samples <inline-formula><mml:math id="M52"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> &#x0003D; 100 and number of basis functions <italic>M</italic>&#x02009;&#x0003D;&#x02009;5.</p>
<fig position="float" id="F2">
<label>Figure 2</label>
<caption><p>The observed trajectories are represented in magenta. The corresponding ProMP is represented in blue. The following parameters are used: <inline-formula><mml:math id="M53"><mml:mover accent="true"><mml:mrow><mml:mtext mathvariant="italic">s</mml:mtext></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext>100</mml:mtext></mml:math></inline-formula> for the reference number of samples, <italic>M</italic>&#x02009;&#x0003D;&#x02009;5 for the number of RBFs spread over time, and <italic>h</italic>&#x02009;&#x0003D;&#x02009;0.04 <inline-formula><mml:math id="M54"><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mtext>1</mml:mtext></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mtext mathvariant="italic">M</mml:mtext></mml:mrow><mml:mrow><mml:mtext>2</mml:mtext></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:math></inline-formula> the variance of the RBFs.</p></caption>
<graphic xlink:href="frobt-04-00045-g002.tif"/>
</fig>
<p>This example is included in our Matlab toolbox as <monospace>demo_plot1DOF.m</monospace>. The explanation of this Matlab script is presented in Section <xref ref-type="sec" rid="S5">5</xref>. More complex examples are also included in the scripts <monospace>demo_plot&#x0002A;.m</monospace>.</p>
</sec>
<sec id="S3-6">
<label>3.3</label> <title>Predicting the Future Movement from Initial Observations</title>
<p>Once the ProMP <inline-formula><mml:math id="M55"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> of a certain task has been learned,<xref ref-type="fn" rid="fn8"><sup>8</sup></xref> we can use it to predict the evolution of an initiated movement. An underlying hypothesis is that the observed movement follows to this learned distribution.</p>
<p>Suppose that the robot measures the first <italic>n<sub>o</sub></italic> observations of the trajectory to predict (e.g., lifting the arm). We call these observations &#x0039E;<italic><sup>o</sup></italic>&#x02009;&#x0003D;&#x02009;[<italic>&#x003BE;<sup>o</sup></italic>(1),&#x02009;&#x02026;,&#x02009;<italic>&#x003BE;<sup>o</sup></italic>(<italic>n<sub>o</sub></italic>)]. The goal is then to predict the evolution of the trajectory after these <italic>n<sub>o</sub></italic> observations, i.e., find <inline-formula><mml:math id="M56"><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M57"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the estimation of the trajectory duration (see Section <xref ref-type="sec" rid="S3-7">3.4</xref>). This is equivalent to predicting the entire <inline-formula><mml:math id="M58"><mml:mover accent='true'><mml:mo>&#x0039E;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> trajectory where the first <italic>n<sub>o</sub></italic> samples are known and equal to the observations: <inline-formula><mml:math id="M59"><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>. Therefore, our prediction problem consists of predicting <inline-formula><mml:math id="M60"><mml:mover accent='true'><mml:mo>&#x0039E;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> given the &#x0039E;<italic><sup>o</sup></italic> observations.</p>
<p>To do this prediction, we start from the learned prior distribution <italic>p</italic>(<bold><italic>&#x003C9;</italic></bold>), and we find the <inline-formula><mml:math id="M61"><mml:mover accent='true'><mml:mo>&#x003C9;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> parameter within this distribution that generates <inline-formula><mml:math id="M62"><mml:mover accent='true'><mml:mo>&#x0039E;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>. To find this <inline-formula><mml:math id="M63"><mml:mover accent='true'><mml:mo>&#x003C9;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> parameter, we update the learned distribution <inline-formula><mml:math id="M64"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> using the following formulae:
<disp-formula id="E9"><label>(8)</label><mml:math id="M65"><mml:mfenced separators="" open="{" close=""><mml:mrow><mml:mtable equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mspace width="1em" class="quad"/></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">,</mml:mo><mml:mspace width="1em" class="quad"/></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></disp-formula>
where <italic>K</italic> is a gain computed by the following equation:
<disp-formula id="E10"><label>(9)</label><mml:math id="M66"><mml:mi>K</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="0.3em" class="thinspace"/><mml:msup><mml:mrow><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>Equations <xref ref-type="disp-formula" rid="E9">(8)</xref> and <xref ref-type="disp-formula" rid="E10">(9)</xref> can be computed through the marginal and conditional distributions (Bishop, <xref ref-type="bibr" rid="B5">2006</xref>; Paraschos et al., <xref ref-type="bibr" rid="B55">2013a</xref>), as detailed in Appendix A.</p>
<p>Figure <xref ref-type="fig" rid="F3">3</xref> shows the predicted trajectory for the lifting motion of the left arm of iCub. The different graphs show inferred trajectories when the robot observed <italic>n<sub>o</sub></italic>&#x02009;&#x0003D;&#x02009;10, 30, 50, and 80% of the total trajectory duration. This example is also available in the toolbox as <monospace>demo_plot1DOF.m</monospace>. The <monospace>nbData</monospace> variable changes the percentage of known data. Thus, it will be visible how the inference improves according to this variable. An example of predicted trajectories of the arm lifting in Gazebo can be found in a provided video (see Section <xref ref-type="sec" rid="S8">8</xref>).</p>
<fig position="float" id="F3">
<label>Figure 3</label>
<caption><p>The prediction of the future trajectory given early observations, exploiting the information of the learned ProMP (Figure <xref ref-type="fig" rid="F2">2</xref>). The plots show the predicted trajectories after 10, 30, 50, and 80% of observed data points.</p></caption>
<graphic xlink:href="frobt-04-00045-g003.tif"/>
</fig>
</sec>
<sec id="S3-7">
<label>3.4</label> <title>Predicting the Trajectory Time Modulation</title>
<p>In the previous section, we presented the general formulation of ProMPs, which makes the implicit assumption that all the observed trajectories have the same duration and thus the same sampling.<xref ref-type="fn" rid="fn9"><sup>9</sup></xref> That is why the duration of the trajectories generated by the RBF is fixed and equal to <inline-formula><mml:math id="M67"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>. Of course, this is valid only for synthetic data and not for real data.</p>
<p>To be able to address real experimental conditions, we now consider the variation of the duration of the demonstrated trajectories. To this end, we introduce a time modulation parameter <italic>&#x003B1;</italic> that maps the actual trajectory duration <italic>t<sub>f</sub></italic> to <inline-formula><mml:math id="M68"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>: <inline-formula><mml:math id="M69"><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover><mml:mo class="MathClass-bin">&#x02215;</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. The normalized duration <inline-formula><mml:math id="M70"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> can be chosen arbitrarily; for example it can be set to the average of the duration of the trajectories, e.g., <inline-formula><mml:math id="M71"><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext mathvariant="italic">mean</mml:mtext><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fK</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>. Notably, in the literature sometimes <italic>&#x003B1;</italic> is called <italic>phase</italic> (Paraschos et al., <xref ref-type="bibr" rid="B55">2013a</xref>,<xref ref-type="bibr" rid="B56">b</xref>). The effect of <italic>&#x003B1;</italic> is to change the phase of the RBFs, which are scaled in time.</p>
<p>The time modulation of the <italic>i</italic>-th trajectory &#x0039E;<italic><sub>i</sub></italic> is computed by <inline-formula><mml:math id="M72"><mml:msub><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:math></inline-formula>. Thus, we have <inline-formula><mml:math id="M73"><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula>. Thus, the improved ProMP model is as follows:
<disp-formula id="E11"><label>(10)</label><mml:math id="M74"><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where &#x003A6;<italic><sub>&#x003B1;t</sub></italic> is the RBFs matrix evaluated at time <italic>&#x003B1;t</italic>. All the <italic>M</italic> Gaussian functions of the RBFs are spread over the same number of samples <inline-formula><mml:math id="M75"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>. Thus, we have the following:
<disp-formula id="E12"><mml:math id="M76"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">.</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003C8;</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>During the learning step, we record a set of <italic>&#x003B1;</italic> parameters: <italic>S<sub>&#x003B1;</sub></italic>&#x02009;&#x0003D;&#x02009;{&#x003B1;<sub>1</sub>,&#x02009;&#x02026;,&#x02009;&#x003B1;<italic><sub>n</sub></italic>}. Then, using this set, we can replay the learned ProMP with different speeds. By default (e.g., when <italic>&#x003B1;</italic>&#x02009;&#x0003D;&#x02009;1), the speed allows to finish the movement in <inline-formula><mml:math id="M77"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> samples.</p>
<p>During the inference, the time modulation <italic>&#x003B1;</italic> of the partially observed trajectory is not known. Unless fixed <italic>a priori</italic>, the robot must estimate it. This estimation is critical to ensure a good recognition, as shown in Figure <xref ref-type="fig" rid="F4">4</xref>: the inferred trajectory (represented by the mean of the posterior distribution in red) does not have the same duration as the &#x0201C;real&#x0201D; intended trajectory (which is the ground truth). This difference is due to the estimation error of the time modulation parameter. This estimation <inline-formula><mml:math id="M78"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> by default is computed as the mean of all the <italic>&#x003B1;<sub>k</sub></italic> observed during the learning:
<disp-formula id="E13"><label>(11)</label><mml:math id="M79"><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mo class="MathClass-op">&#x02211;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<fig position="float" id="F4">
<label>Figure 4</label>
<caption><p>This plot shows the predicted trajectory given early observations (data points, in black), compared to the ground truth (e.g., the trajectory that the human intends to execute with the robot). We show the prior distribution (in light blue) and the posterior distribution (in red), which is computed by conditioning the distribution to match the observations. Here, the posterior simply uses the average <italic>&#x003B1;</italic> computed over the <italic>&#x003B1;</italic><sub>1</sub>,&#x02009;&#x02026;,&#x02009;&#x003B1;<italic><sub>K</sub></italic> of the <italic>K</italic> demonstrations. Without predicting the time modulation from the observations and using the average <italic>&#x003B1;</italic>, the predicted trajectory has a duration that is visibly different from the ground truth.</p></caption>
<graphic xlink:href="frobt-04-00045-g004.tif"/>
</fig>
<p>However, using the mean value for the time modulation is an appropriate choice only when the primitive represents goal-directed motions that are very regular, or for which we can reasonably assume that differences in the duration can be neglected (which is not a general case). In many applications, this estimation may be too rough.</p>
<p>Thus, we have to find a way to estimate the duration of the observed trajectory, which corresponds to accurately estimating the time modulation parameter <inline-formula><mml:math id="M80"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>. To estimate <inline-formula><mml:math id="M81"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>, we implemented four different methods. The first is the <bold>mean of all the</bold> <italic>&#x003B1;<sub>k</sub></italic>, as in equation <xref ref-type="disp-formula" rid="E13">(11)</xref>. The second is the <bold>maximum likelihood</bold>, with
<disp-formula id="E14"><label>(12)</label><mml:math id="M82"><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="normal">argmax</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="{" close="}"><mml:mrow><mml:mi mathvariant="normal">loglikelihood</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003C3;</mml:mn></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>The third is the <bold>minimum distance</bold> criterion, where we seek the best <inline-formula><mml:math id="M83"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> that minimizes the difference between the observed trajectory <inline-formula><mml:math id="M84"><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> and the predicted trajectory for the first <italic>n<sub>o</sub></italic> data points:
<disp-formula id="E15"><label>(13)</label><mml:math id="M85"><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="normal">argmin</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="{" close="}"><mml:mrow><mml:mstyle displaystyle='true'><mml:munderover><mml:mrow><mml:mo class="MathClass-op">&#x02211;</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:munderover></mml:mstyle><mml:mfenced separators="" open="|" close="|"><mml:mrow><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>The fourth method is based on a <bold>model</bold>: we assume that there is a correlation between <italic>&#x003B1;</italic> and the variation of the trajectory <inline-formula><mml:math id="M86"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> from the beginning until the time <italic>n<sub>o</sub></italic>. This &#x0201C;variation&#x0201D; <inline-formula><mml:math id="M87"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> can be computed as the variation of the position, e.g., <inline-formula><mml:math id="M88"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi>X</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>X</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>, or the variation in the entire trajectory, <inline-formula><mml:math id="M89"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>, or any other measure of progress, if this hypothesis is appropriate for the type of task trajectories of the application.<xref ref-type="fn" rid="fn10"><sup>10</sup></xref> Indeed, the <italic>&#x003B1;</italic> can be linked also to the movement speed, which can be roughly approximated by <inline-formula><mml:math id="M90"><mml:mi>&#x01E8A;</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mi>&#x003B4;</mml:mi><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:math></inline-formula> <inline-formula><mml:math id="M91"><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x002D9;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mi>&#x003B4;</mml:mi><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:math></inline-formula>. We model the mapping between <inline-formula><mml:math id="M92"><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula> and <italic>&#x003B1;</italic> by the following equation:
<disp-formula id="E16"><label>(14)</label><mml:math id="M93"><mml:mi>&#x003B1;</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>&#x003A8;</mml:mn><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where &#x003A8; are RBFs, and <inline-formula><mml:math id="M94"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is a zero-mean Gaussian noise. During learning, we compute the <bold><italic>&#x003C9;</italic></bold><italic><sub>&#x003B1;</sub></italic> parameter, using the same method as in equation <xref ref-type="disp-formula" rid="E4">(3)</xref>. During the inference, we compute <inline-formula><mml:math id="M95"><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>&#x003A8;</mml:mn><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003B4;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>.</p>
<p>A comparison of the four methods for estimating <italic>&#x003B1;</italic> on a test study with iCub in simulation is presented in Section <xref ref-type="sec" rid="S6-14">6.6</xref>.</p>
<p>There exist other methods in the literature for computing <italic>&#x003B1;</italic>. For example, Ewerton et al. (<xref ref-type="bibr" rid="B24">2015</xref>) propose a method that models local variability in the speed of execution. In Maeda et al. (<xref ref-type="bibr" rid="B50">2016</xref>), they use a method that improves Dynamic Time Warping by imposing a smooth function on the time alignment mapping using local optimization. These methods will be implemented in the future works.</p>
</sec>
<sec id="S3-8">
<label>3.5</label> <title>Recognizing One among Many Movement Primitives</title>
<p>Robots should not learn only one skills but many: different skills for different tasks. In our framework, tasks are represented by movement primitives, precisely ProMP. So it is important for the robot to be able to learn <italic>K</italic> different ProMPs and then be able to recognize from the early observations of a trajectory which of the <italic>K</italic> ProMPs the observations belong to.</p>
<p>During the learning step of a movement primitive <italic>k</italic>&#x02009;&#x02208;&#x02009;[1 : <italic>K</italic>], the robot observes different trajectories <italic>S<sub>k</sub></italic>&#x02009;&#x0003D;&#x02009;{&#x0039E;<sub>1</sub>,&#x02009;&#x02026;,&#x02009;&#x0039E;<italic><sub>n</sub></italic>}. For each ProMP, it learns the distribution over the parameters vector <inline-formula><mml:math id="M96"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula>, using equation <xref ref-type="disp-formula" rid="E4">(3)</xref>. Moreover, the robot records the different phases of all the observed trajectories: <italic>S<sub>&#x003B1;k</sub></italic>&#x02009;&#x0003D;&#x02009;{&#x003B1;<sub>1</sub><italic><sub>k</sub></italic>,&#x02009;&#x02026;,&#x02009;&#x003B1;<italic><sub>nk</sub></italic>}.</p>
<p>After having learned these <italic>K</italic> ProMPs, the robot can use this information to autonomously execute a task trajectory. Since we are targeting collaborative movements, performed together with a partner at least at the beginning, we want the robot to be able to recognize from the first observations of a collaborative trajectory which is the current task that the partner is doing and what is the intention of the partner. Finally, we want the robot to be able to complete the task on its own, once it has recognized the task and predicted the future trajectory.</p>
<p>Let <inline-formula><mml:math id="M97"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula> be the early observations of an initiated trajectory.</p>
<p>From these partial observations, the robot can recognize the &#x0201C;correct&#x0201D; (i.e., most likely) ProMP <inline-formula><mml:math id="M98"><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:mi>K</mml:mi></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula>. First, for each ProMP <italic>k</italic>&#x02009;&#x02208;&#x02009;[1 : <italic>K</italic>], it computes the most likely phase (time modulation factor) <inline-formula><mml:math id="M99"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> (as explained in Section <xref ref-type="sec" rid="S3-7">3.4</xref>), to obtain the set of ProMPs with the most likely duration: <inline-formula><mml:math id="M100"><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>K</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>K</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
<p>Then we compute the most likely ProMP <inline-formula><mml:math id="M101"><mml:mover accent='true'><mml:mi>k</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> in <inline-formula><mml:math id="M102"><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> according to some criterion. One possible way is to minimize the distance between the early observations and the mean of the ProMP for the first portion of the trajectory:
<disp-formula id="E17"><label>(15)</label><mml:math id="M103"><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="normal">arg</mml:mi><mml:mrow><mml:munder><mml:mrow><mml:mi>min</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo stretchy='false'>[</mml:mo><mml:mn>1</mml:mn><mml:mo>:</mml:mo><mml:mi>K</mml:mi><mml:mo stretchy='false'>]</mml:mo></mml:mrow></mml:munder></mml:mrow><mml:mtext>&#x02009;</mml:mtext><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mfrac><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mstyle displaystyle='true'><mml:munderover><mml:mrow><mml:mi mathvariant="normal">&#x02211;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:munderover></mml:mstyle><mml:mn class="MathClass-rel">&#x0007C;</mml:mn><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mi mathvariant="normal">&#x0005E;</mml:mi></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mn class="MathClass-rel">&#x0007C;</mml:mn></mml:mrow></mml:mfenced><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>In equation <xref ref-type="disp-formula" rid="E17">(15)</xref>, for each ProMP <italic>k</italic>&#x02009;&#x02208;&#x02009;[1 : <italic>K</italic>], we compute the average distance between the observed early-trajectory &#x0039E;<italic><sub>t</sub></italic> and the mean trajectory of the ProMP <inline-formula><mml:math id="M104"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></inline-formula>, with <italic>t</italic>&#x02009;&#x0003D;&#x02009;[1 : <italic>n<sub>o</sub></italic>]. The most likely ProMP <inline-formula><mml:math id="M105"><mml:mover accent='true'><mml:mi>k</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> is selected by computing the minimum distance (arg min). Other possible methods for estimating the most likely ProMPs could be inspired by those presented in the previous section for estimating the time modulation, i.e., maximum likelihood or learned models.</p>
<p>Once identified the <inline-formula><mml:math id="M106"><mml:mover accent='true'><mml:mi>k</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>-th most likely ProMP, we update its posterior distribution to take into account the initial portion of the observed trajectory, using equation <xref ref-type="disp-formula" rid="E9">(8)</xref>:
<disp-formula id="E18"><label>(16)</label><mml:math id="M107"><mml:mfenced separators="" open="{" close=""><mml:mrow><mml:mtable equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:mi>K</mml:mi></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="0.3em" class="thinspace"/><mml:msup><mml:mrow><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></disp-formula>
with <inline-formula><mml:math id="M108"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:mi>t</mml:mi></mml:math></inline-formula> (in matrix form), with <italic>t</italic>&#x02009;&#x02208;&#x02009;[1 : <italic>n<sub>o</sub></italic>].</p>
<p>Finally, the inferred trajectory is given by the following equation:
<disp-formula id="E19"><mml:math id="M109"><mml:mo class="MathClass-rel">&#x02200;</mml:mo><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:math></disp-formula>
with the expected duration of the trajectory <inline-formula><mml:math id="M110"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003B1;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>. The robot is now able to finish the movement executing the most likely &#x0201C;future&#x0201D; trajectory <inline-formula><mml:math id="M111"><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>.</p>
</sec>
</sec>
<sec id="S4">
<label>4</label> <title>Software Overview</title>
<p>In this section, we introduce our open-source software with an overview of its architecture. This software is composed of two main modules, represented in Figure <xref ref-type="fig" rid="F5">5</xref>.</p>
<fig position="float" id="F5">
<label>Figure 5</label>
<caption><p>Software architecture and data flows. The robot&#x02019;s control is done either by the user&#x02019;s guidance (manually or through a haptic device) represented in blue, or by the Matlab module, in purple. The C&#x0002B;&#x0002B; module handles the control source to command the robot, as represented in black. Moreover, this module forwards information that comes from the iCub.</p></caption>
<graphic xlink:href="frobt-04-00045-g005.tif"/>
</fig>
<p>While the robot is learning the Probabilistic Movement Primitives (ProMPs) associated with the different tasks, the robot is controlled by its user. The user&#x02019;s guidance can be either manual for the real iCub, or through a haptic device for the simulated robot.</p>
<p>A Matlab module allows replaying movement primitives or finishing a movement that has been initiated by its user. By using this module, the robot can learn distributions over trajectories, replay movement primitives (using the mean of the distribution), recognize the ProMP that best matches a current trajectory, and infer the future evolution (until the end target) of this trajectory.</p>
<p>A C&#x0002B;&#x0002B; module forwards to the robot the control that comes either from the user or from the Matlab module. Then, the robot is able to finish a movement initiated by its user (directly or through a haptic device) in an autonomous way, as shown in Figure <xref ref-type="fig" rid="F1">1</xref>.</p>
<p>We present the C&#x0002B;&#x0002B; module in Section <xref ref-type="sec" rid="S6-10">6.2</xref> and the theoretical explanation of the Matlab module algorithms in Section <xref ref-type="sec" rid="S3">3</xref>. A guide to run this last module is first presented in Section <xref ref-type="sec" rid="S5">5</xref> for a simple example, and in Section <xref ref-type="sec" rid="S6">6</xref> for our application, where a simulated robot learns many measured information of the movements. Finally, we present results on the real iCub application in Section <xref ref-type="sec" rid="S7">7</xref>.</p>
<p>Our software is available through the GPL license, and publicly available at:</p>
<p><uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories">https://github.com/inria-larsen/icubLearningTrajectories</uri>.</p>
<p>Tutorial, readme, and videos can be found in that repository. First, the readme file describes how to launch simple demonstrations of the software. Videos present these demonstrations to simplify the understanding. In the next sections, we detail the operation of the demo program for a first case of 1-DOF primitive, followed by the presentation of the specific applications on the iCub (first simulated and then real).</p>
</sec>
<sec id="S5">
<label>5</label> <title>Software Example: Learning a 1-DOF Primitive</title>
<p>In this section, we present the use of the software to learn ProMPs in a simple case of 1-DOF primitive. This example only uses the <italic>MatlabProgram</italic> folder, composed of:
<list list-type="bullet">
<list-item><p>A sub-folder called &#x0201C;Data,&#x0201D; where there are trajectory sets used to learn movement primitives. These trajectories are stored in text files with the following information:
<list list-type="simple">
<list-item><label>&#x02013;</label> <p><bold>input parameters</bold>: &#x00023; input<sub>1</sub> &#x00023; input<sub>2</sub> [&#x02026;]</p></list-item>
<list-item><label>&#x02013;</label> <p><bold>input parameters with time step</bold>: &#x00023; timeStep &#x00023; input<sub>1</sub> &#x00023; input<sub>2</sub> [&#x02026;]</p></list-item>
<list-item><label>&#x02013;</label> <p><bold><italic>recordTrajectories.cpp</italic></bold> <italic>program recording</italic>: See Section <xref ref-type="sec" rid="S6-11">6.3</xref> for more information.</p></list-item>
</list></p></list-item>
<list-item><p>A sub-folder called &#x0201C;used_functions.&#x0201D; It contains all the functions used to retrieve trajectories, compute ProMPs, infer trajectories, and plot results. Normally, using this toolbox does not require understanding these functions. The first lines of these functions give an explanation of their functioning and precise what are the input(s) and output(s) parameters.</p></list-item>
<list-item><p>Matlab scripts called &#x0201C;demo_&#x0002A;.m.&#x0201D; They are simple examples of how to use this toolbox.</p></list-item>
</list></p>
<p>The script <monospace>demo_plot1DOF.m</monospace>, can be used to compute a ProMP and to continue an initiated movement. The ProMP is computed from a dataset stored in a &#x0201C;.mat&#x0201D; file, called <italic>traj1_1DOF.mat</italic>. In this script, variables are first defined to make the script specific to the current dataset:
<table-wrap position="float">
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left">Variable assignation</th>
<th align="left">Commentary</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">DataPath&#x02009;&#x0003D;&#x02009;&#x02018;Datatraj1_1DOF.mat&#x02019;;</td>
<td align="left">Can be either &#x0201C;.mat&#x0201D; or &#x0201C;.txt&#x0201D;. In the current demo, you can also write DataPath&#x02009;&#x0003D;&#x02009;&#x02018;Data/traj1&#x02019; if you want to use the text files of this dataset.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">typeRecover&#x02009;&#x0003D;&#x02009;&#x02018;.mat&#x02019;</td>
<td align="left">Or .txt, it depends on your choice of data file.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">inputName&#x02009;&#x0003D;&#x02009;{&#x02018;z[m]&#x02019;};</td>
<td align="left">Label of your input(s). Here <italic>z</italic> represents the <italic>z</italic>-axis Cartesian coordinate.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">s_ref&#x02009;&#x0003D;&#x02009;100;</td>
<td align="left">Number of samples used as reference to rescale all the trajectories to the same duration.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">nbInput&#x02009;&#x0003D;&#x02009;1;</td>
<td align="left">Dimension of the generic vector containing the state of the trajectory.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">M&#x02009;&#x0003D;&#x02009;5;</td>
<td align="left">Number of radial basis functions per input.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">expNoise&#x02009;&#x0003D;&#x02009;0.00001;</td>
<td align="left">Expected trajectory noise.</td>
</tr>
<tr>
<td align="left" colspan="2"><hr/></td>
</tr>
<tr>
<td align="left">percentData&#x02009;&#x0003D;&#x02009;20;</td>
<td align="left">Percent of observed data during the inference.</td>
</tr>
</tbody>
</table>
</table-wrap></p>
<p>The variables include the following:
<list list-type="bullet">
<list-item><p><monospace>DataPath</monospace> is the path to the recorded data. If the data are stored in text files, this variable contains the folder name where text files are stored. These text files are called &#x0201C;record<italic>X</italic>.txt,&#x0201D; with <italic>X</italic>&#x02009;&#x02208;&#x02009;[0: <italic>n&#x02009;&#x02212;&#x02009;</italic>1] if there are <italic>n</italic> trajectories. One folder is used to learn one ProMP. If the data are already loaded from a &#x0201C;.mat&#x0201D; file, write the whole path with the extension. The data in &#x0201C;.mat&#x0201D; match with the output of the Matlab function <monospace>loadTrajectory</monospace>.</p></list-item>
<list-item><p><monospace>nbInput</monospace>&#x02009;&#x0003D;&#x02009;<italic>D</italic> is the dimension of the input vector <italic>&#x003BE;<sub>t</sub></italic>.</p></list-item>
<list-item><p><monospace>expNoise</monospace>&#x02009;<inline-formula><mml:math id="M112"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is the expected noise of the initiated trajectory. The smaller this variable is, the stronger the modification of the ProMP distribution will be, given new observations.</p></list-item>
</list></p>
<p>We will now explain more in detail the script. To recover data recorded in a &#x0201C;.txt&#x0201D; file, we call the function:
<list list-type="simple">
<list-item><p><monospace>t{1}</monospace>&#x02009;&#x0003D;<monospace>&#x02009;loadTrajectory(PATH, nameT, varargin)</monospace></p></list-item>
</list></p>
<p>Its input parameters specify the path of the recorded data, the label of the trajectory. Other information can be added by using the <monospace>varargin</monospace> variable (for more detail, check the header of the function with the help comments). The output is an object that contains all the information about the demonstrated trajectories. It is composed of <monospace>nbTraj</monospace>, the number of trajectory; <monospace>realTime</monospace>, the simulation time; and <monospace>y</monospace> (and <monospace>yMat</monospace>), the vector (and matrix) trajectory set. Thus, <monospace>t{1}.y{i}</monospace> contains the <italic>i</italic>-th trajectory.</p>
<p>The Matlab function <monospace>drawRecoverData(t{1}, inputName,&#x02019;namFig&#x02019;, nFig, varargin)</monospace> plots in a Matlab figure (numbered <monospace>nFig</monospace>) the dataset of loaded trajectories. An example is shown in Figure <xref ref-type="fig" rid="F2">2</xref>, on the left. Incidentally, the different duration of the trajectories is visible: on average, it is 1.17&#x02009;&#x000B1;&#x02009;0.42&#x02009;s.</p>
<p>To split the entire dataset of demonstrated trajectories <monospace>t{1}</monospace> into a training dataset (used for learning the ProMPs) and a test dataset (used for the inference), call the function
<list list-type="simple">
<list-item><p><monospace>[train, test]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;partitionTrajectory(t{1}, partitionType, percentData, s_ref)</monospace></p></list-item>
</list></p>
<p>where if <monospace>partitionType</monospace>&#x02009;&#x0003D;&#x02009;1, only one trajectory is in the test set and the others are placed in the training set, and if <monospace>partitionType</monospace>&#x02009;&#x0003E;<monospace>&#x02009;</monospace>1 it corresponds to the percentage of trajectories that will be included in the training set.</p>
<p>The ProMP can be computed from the training set by using the function:
<list list-type="simple">
<list-item><p><monospace>promp</monospace>&#x02009;&#x0003D;<monospace>&#x02009;computeDistribution(train, M, s_ref, c, h)</monospace></p></list-item>
</list></p>
<p>The output variable <monospace>promp</monospace> is an object that contains all the ProMP information. The first three input parameters have been presented before: <monospace>train</monospace> is the training set, <monospace>M</monospace> is the number of RBFs, and <monospace>s_ref</monospace> is the number of samples used to rescale all the trajectories. The last two input parameters <monospace>c</monospace> and <monospace>h</monospace> shape the RBFs of the ProMP model: <monospace>c</monospace>&#x02009;&#x02208;&#x02009;<inline-formula><mml:math id="M113"><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is the center of the Gaussians and <monospace>h</monospace>&#x02009;&#x02208;&#x02009;&#x0211B; their variance.</p>
<p>To visualize this ProMP, as shown in Figure <xref ref-type="fig" rid="F2">2</xref>, call the function:
<list list-type="simple">
<list-item><p><monospace>drawDistribution(promp, inputName, s_ref)</monospace></p></list-item>
</list></p>
<p>For debugging purposes and to understand how to tune the ProMPs&#x02019; parameters, it is interesting to plot the overlay of the basis functions in time. Choosing an appropriate number of basis functions is important, as too few may be insufficient to approximate the trajectories under consideration, and too many could result in overfitting problems. To plot the basis functions, simply call:
<list list-type="simple">
<list-item><p><monospace>drawBasisFunction(promp.PHI, M)</monospace></p></list-item>
</list></p>
<p>where <monospace>promp.PHI</monospace> is a set of RBFs evaluated in the normalized time range <inline-formula><mml:math id="M114"><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
<p>Figure S1 in Supplementary Material shows at the top the basis functions before normalization, and at the bottom the ProMP modeled from these basis functions. From left to right, we change the number of basis functions. When there are not enough basis functions (left), the model is not able to correctly represent the shape of the trajectories. In the middle, the trajectories are well represented by the five basis functions. With more basis functions (right), the variance of the distribution decreases because the model is more accurate. However, arbitrarily increasing the number of basis functions is not a good idea, as it may not improve the accuracy of the model and worse it may cause overfitting.</p>
<p>Once the ProMP is learned, the robot can reproduce the movement primitive using the mean of the distribution. Moreover, it can now recognize a movement that has been initiated in this distribution and predict how to finish it. To do so, given the early <italic>n<sub>o</sub></italic> observations of a movement, the robot updates the prior distribution to match the early observed data points: through conditioning, it finds the posterior distribution, which can be used by the robot to execute the movement on its own.</p>
<p>The first step in predicting the evolution of the trajectory is to infer the duration of this trajectory, which is encoded by the time modulation parameter <inline-formula><mml:math id="M115"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>. The computation of this inference, which was detailed in Section <xref ref-type="sec" rid="S3-7">3.4</xref>, can be done by using the function:
<list list-type="simple">
<list-item><p><monospace>[expAlpha, type, x]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inferenceAlpha(promp, test{1}, M, s_ref, c, h, test{1}.nbData</monospace>, &#x02026; <monospace>expNoise, typeReco)</monospace></p></list-item>
</list></p>
<p>where <monospace>typeReco</monospace> is the type of criteria used to find the expected time modulation (&#x0201C;MO,&#x0201D; &#x0201C;DI,&#x0201D; or &#x0201C;ML&#x0201D; for model, distance or maximum likelihood methods); <monospace>expAlpha</monospace> &#x0003D; <inline-formula><mml:math id="M116"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> is the expected time modulation; <monospace>type</monospace> is the index of the ProMP from which <monospace>expAlpha</monospace> has been computed, which we note in this article as <italic>k</italic>. To predict the evolution of the trajectory, we use equation <xref ref-type="disp-formula" rid="E9">(8)</xref> from Section <xref ref-type="sec" rid="S3-6">3.3</xref>. In Matlab, this is done by the function:
<list list-type="simple">
<list-item><p><monospace>infTraj</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inference(promp, test{1}, M, s_ref, c, h,</monospace>&#x02026; <monospace>test{1}.nbData, expNoise, expAlpha).</monospace></p></list-item>
</list></p>
<p>where <monospace>test{1}.nbData</monospace> has been computed during the <monospace>partitionTrajectory</monospace> step. This variable is the number of observations <italic>n<sub>o</sub></italic>, representing the percentage of observed data (<monospace>percentData</monospace>) of the test trajectory (i.e., to be inferred) that the robot observes. <monospace>infTraj</monospace> &#x0003D; <inline-formula><mml:math id="M117"><mml:mover accent='true'><mml:mo>&#x0039E;</mml:mo><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula> is the inferred trajectory. Finally, to draw the inferred trajectory, we can call the function <monospace>drawInference(promp, inputName, infTraj, test1, s_ref)</monospace>.</p>
<p>It can be interesting to plot the quality of the predicted trajectories as a function of the number of observations, as done in Figure <xref ref-type="fig" rid="F3">3</xref>.</p>
<p>Note that when we have observed a larger portion of the trajectory, the prediction of the remaining portion is more accurate.</p>
<p>Now we want to measure the quality of the prediction. Let <inline-formula><mml:math id="M118"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02217;</mml:mo></mml:mrow></mml:msubsup></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula> be the real trajectory expected by the user. To measure the quality of the prediction, we can use:
<list list-type="bullet">
<list-item><p>The likelihood of having the &#x0039E;<sup>&#x0002A;</sup> trajectory given the updated distribution p(<inline-formula><mml:math id="M119"><mml:mover accent='true'><mml:mstyle mathvariant="bold-italic"><mml:mo>&#x003C9;</mml:mo></mml:mstyle><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>).</p></list-item>
<list-item><p>The distance between the &#x0039E;<sup>&#x0002A;</sup> trajectory and the <inline-formula><mml:math id="M120"><mml:mover accent='true'><mml:mo>&#x0039E;</mml:mo><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> inferred trajectory.</p></list-item>
</list></p>
<p>However, according to the type of recognition <monospace>typeReco</monospace> used to estimate the time modulation parameter <italic>&#x003B1;</italic> from the early observations, a visible mismatch between the predicted trajectory and the real one can be visible even when a lot of observations are used. This is due to the error of the expectation of this time modulation parameter. In Section <xref ref-type="sec" rid="S3-7">3.4</xref>, we present the different methods used to predict the trajectory duration. These methods select the most likely <inline-formula><mml:math id="M121"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> according to different criteria: distance; maximum likelihood; model of the <italic>&#x003B1;</italic> variable<xref ref-type="fn" rid="fn11"><sup>11</sup></xref>; and average of the observed <italic>&#x003B1;</italic> during learning.</p>
<p>Figure <xref ref-type="fig" rid="F6">6</xref> shows the different trajectories predicted after <italic>n<sub>o</sub></italic>&#x02009;&#x0003D;&#x02009;40% of the length of the desired trajectory is observed, according to the method used to estimate the time modulation parameter.</p>
<fig position="float" id="F6">
<label>Figure 6</label>
<caption><p>The prediction of the future trajectory given <italic>n<sub>o</sub></italic>&#x02009;&#x0003D;&#x02009;40% of early observations from the learned ProMP computed for the test dataset (Figure <xref ref-type="fig" rid="F2">2</xref>). The plots show the predicted trajectory, using different criteria to estimate the best phases of the trajectory: using the average time modulation (equation <xref ref-type="disp-formula" rid="E13">(11)</xref>); using the distance criteria (equation <xref ref-type="disp-formula" rid="E15">(13)</xref>); using the maximum log-likelihood (equation <xref ref-type="disp-formula" rid="E14">(12)</xref>); or using a model of time modulation according to the time variation (equation <xref ref-type="disp-formula" rid="E16">(14)</xref>).</p></caption>
<graphic xlink:href="frobt-04-00045-g006.tif"/>
</fig>
<p>On this simple test, where the variation time is little as shown in Table <xref ref-type="table" rid="T2">2</xref>, the best result is accomplished by the average of time modulation parameter of the trajectories used during the learning step. In more complicated cases, when the time modulation varies, the other methods will be preferable as seen in Section <xref ref-type="sec" rid="S3-8">3.5</xref>.</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Information about trajectories&#x02019; duration.</p></caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="center"/>
<th align="center"><bold>Traj. samples</bold></th>
<th align="center"><inline-formula><mml:math id="M122"><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003B1;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mtext mathvariant="bold-italic">s</mml:mtext></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mtext mathvariant="bold">Iterations</mml:mtext></mml:mrow></mml:mfrac><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mtext mathvariant="bold-italic">s</mml:mtext></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext>100</mml:mtext></mml:math></inline-formula></th>
<th align="center"><bold>Duration [s]</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Min</td>
<td align="center">83</td>
<td align="center">1.2048</td>
<td align="center">0.83</td>
</tr>
<tr>
<td align="left">Max</td>
<td align="center">115</td>
<td align="center">0.8696</td>
<td align="center">1.15</td>
</tr>
<tr>
<td align="left">Mean</td>
<td align="center">100</td>
<td align="center">1</td>
<td align="center">0.99</td>
</tr>
<tr>
<td align="left">SD</td>
<td align="center">9</td>
<td align="center">11.1111</td>
<td align="center">0.09</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="S6">
<label>6</label> <title>Application on the Simulated iCub: Learning Three Primitives</title>
<p>In this application, the robot learns multiple ProMPs and is able to predict the future trajectory of a movement initiated by the user, assuming the movement belongs to one of the learned primitives. Based on this prediction, it can also complete the movement once it has recognized the appropriate ProMP.</p>
<p>We simplify the three actions/tasks by reaching three different targets, represented by three colored balls in the reachable workspace of the iCub. The example is performed with the simulated iCub in Gazebo. Figure <xref ref-type="fig" rid="F7">7</xref> shows the three targets, placed at different heights in front of the robot.</p>
<fig position="float" id="F7">
<label>Figure 7</label>
<caption><p>Left: the three colored targets that the robot must reach from the starting point; the corresponding trajectories are used to learn three primitives representing three skills. Right: the Cartesian position information of the demonstrated trajectories for the three reaching tasks.</p></caption>
<graphic xlink:href="frobt-04-00045-g007.tif"/>
</fig>
<p>In Section <xref ref-type="sec" rid="S6-9">6.1</xref>, we formulate the intention recognition problem for the iCub: the problem is to learn the ProMP from trajectories consisting of Cartesian positions in 3D<xref ref-type="fn" rid="fn12"><sup>12</sup></xref> and the 6D wrench information measured by the robot during the movement. In Section <xref ref-type="sec" rid="S6-10">6.2</xref>, we describe the simulated setup of iCub in Gazebo, then in Section <xref ref-type="sec" rid="S6-11">6.3</xref>, we explain how trajectories are recorded, including force information, when we use the simulated robot.</p>
<sec id="S6-9">
<label>6.1</label> <title>Predicting Intended Trajectories by Using ProMPs</title>
<p>The model is based on Section <xref ref-type="sec" rid="S3">3</xref>, but here we want to learn more information during movements. We record this information in a multivariate parameter vector:
<disp-formula id="E20"><mml:math id="M123"><mml:mo class="MathClass-rel">&#x02200;</mml:mo><mml:mi>t</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mn>9</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where <inline-formula><mml:math id="M124"><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> is the Cartesian position of the robot&#x02019;s end effector and <inline-formula><mml:math id="M125"><mml:msub><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mn>6</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> the external forces and moments. In particular, <italic>F<sub>t</sub></italic> contains the user&#x02019;s contact forces and moments. Let us call dim(<italic>&#x003BE;<sub>t</sub></italic>)&#x02009;&#x0003D;&#x02009;<italic>D</italic>, the dimension of this parameter vector.</p>
<p>The corresponding ProMP model is as follows:
<disp-formula id="E21"><mml:math id="M126"><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where <inline-formula><mml:math id="M127"><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is the time-independent parameter vector, <inline-formula><mml:math id="M128"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is the zero-mean Gaussian i.i.d. observation noise, and <inline-formula><mml:math id="M129"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>&#x0211B;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x000D7;</mml:mo><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> a matrix of Radial Basis Functions (RBFs) evaluated at time <italic>&#x003B1;t</italic>.</p>
<p>Since we are in the multidimensional case, this &#x003A6;<italic><sub>&#x003B1;t</sub></italic> block diagonal matrix is defined as follows:
<disp-formula id="E22"><mml:math id="M130"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext mathvariant="italic">BlockdiagonalMatrix</mml:mtext><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003D5;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003D5;</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:msup><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x000D7;</mml:mo><mml:mi>D</mml:mi><mml:mo class="MathClass-bin">&#x022C5;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup><mml:mtext>.</mml:mtext></mml:math></disp-formula></p>
<p>It is a diagonal matrix of <italic>D</italic> Radial Basis Functions (RBFs), where each RBF represents one dimension of the <italic>&#x003BE;<sub>t</sub></italic> vector and it is composed of <italic>M</italic> Gaussians, spread over same number of samples <inline-formula><mml:math id="M131"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>.</p>
<sec id="S6-9-5">
<label>6.1.1</label> <title>Learning Motion Primitives</title>
<p>During the learning step of each movement primitive <italic>k</italic>&#x02009;&#x02208;&#x02009;[1 : 3], the robot observes different trajectories <italic>S<sub>k</sub></italic>&#x02009;&#x0003D;&#x02009;{&#x0039E;<sub>1</sub>,&#x02009;&#x02026;,&#x02009;&#x0039E;<italic><sub>n</sub></italic>}<italic><sub>k</sub></italic>, as presented in Section <xref ref-type="sec" rid="S6-11">6.3</xref>.</p>
<p>For each trajectory <inline-formula><mml:math id="M132"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>, it computes the optimal <bold><italic>&#x003C9;</italic></bold><italic><sub>ki</sub></italic> parameter vector that best approximates the trajectory.</p>
<p>We saw in Section <xref ref-type="sec" rid="S3-8">3.5</xref> how these computations are done. In our software, we use matrix computation instead of <italic>t<sub>fi</sub></italic> iterative ones done for each observation <italic>t</italic> (as in equation <xref ref-type="disp-formula" rid="E4">(3)</xref>). Thus, we have the following:
<disp-formula id="E23"><label>(17)</label><mml:math id="M133"><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">ki</mml:mtext></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mspace width="0.3em" class="thinspace"/><mml:msup><mml:mrow><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:mo class="MathClass-bin">&#x02217;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub></mml:math></disp-formula> with <inline-formula><mml:math id="M134"><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>.</p>
</sec>
<sec id="S6-9-6">
<label>6.1.2</label> <title>Prediction of the Trajectory Evolution from Initial Observations</title>
<p>After having learned the three ProMPs, the robot is able to finish an initiated movement on its own. In Sections <xref ref-type="sec" rid="S3-6">3.3</xref>&#x02013;<xref ref-type="sec" rid="S3-8">3.5</xref>, we explained how to compute the future intended trajectory given the early observations.</p>
<p>In this example, we add specificities about the parameters to learn.</p>
<p>Let <inline-formula><mml:math id="M135"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msup><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msup><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula> be the early observations of the trajectory.</p>
<p>First, we only consider the partial observations: <inline-formula><mml:math id="M136"><mml:msup><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup></mml:math></inline-formula>. Indeed, we assume the recognition of a trajectory is done with Cartesian position information only, because the same movement can be done and recognized with different force profiles than the learned ones.</p>
<p>From this partial observation <italic>X</italic><sup>o</sup>, the robot recognizes the current ProMP <inline-formula><mml:math id="M137"><mml:mover accent="true"><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:mn>3</mml:mn></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula>, as seen in Section <xref ref-type="sec" rid="S3-8">3.5</xref>. It also computes an expectation of the time modulation <inline-formula><mml:math id="M138"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, as seen in Section <xref ref-type="sec" rid="S3-7">3.4</xref>. Using the expected value of the time modulation, it approximates the trajectory speed and its total time duration.</p>
<p>Second, we use the total observation &#x0039E;<italic><sup>o</sup></italic> to update the ProMP, as seen in Section <xref ref-type="sec" rid="S3-6">3.3</xref>. This computation is based on equation (18), but here again, we use the following matrix computation:
<disp-formula id="E24"><mml:math id="M139"><mml:mfenced separators="" open="{" close=""><mml:mrow><mml:mtable equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:mi>K</mml:mi></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msubsup><mml:msup><mml:mrow><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></disp-formula></p>
<p>From this posterior distribution, we retrieve the inferred <inline-formula><mml:math id="M140"><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-punc">.</mml:mo><mml:mo class="MathClass-punc">.</mml:mo><mml:mo class="MathClass-punc">.</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula> trajectory, with:
<disp-formula id="E25"><mml:math id="M141"><mml:mo class="MathClass-rel">&#x02200;</mml:mo><mml:mi>t</mml:mi><mml:mo class="MathClass-rel">&#x02208;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>Note that the inferred wrenches <inline-formula><mml:math id="M142"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, here, correspond to the simulated wrenches in Gazebo. In this example, there is little use for them in simulation; the interest for predicting also wrenches will be clearer in Section <xref ref-type="sec" rid="S7">7</xref>, with the example on the real robot.</p>
</sec>
</sec>
<sec id="S6-10">
<label>6.2</label> <title>Setup for Simulated iCub</title>
<p>For this application, we created a prototype in Gazebo, where the robot must reach three different targets with the help of a human. To interact physically with the robot simulated in Gazebo, we used the Geomagic touch, a haptic device.</p>
<p>The setup consists of the following:
<list list-type="bullet">
<list-item><p>the iCub simulation in Gazebo, complete with the dynamic information provided by <italic>wholeBodyDynamicsTree</italic> (<uri xlink:href="https://github.com/robotology/codyco-modules/tree/master/src/modules/wholeBodyDynamicsTree">https://github.com/robotology/codyco-modules/tree/master/src/modules/wholeBodyDynamicsTree</uri>) and the Cartesian information provided by <italic>iKinCartesianController</italic>;</p></list-item>
<list-item><p>the Geomagic Touch, installed following the instructions in <uri xlink:href="https://github.com/inria-larsen/icub-manual/wiki/Installation-with-the-Geomagic-Touch">https://github.com/inria-larsen/icub-manual/wiki/Installation-with-the-Geomagic-Touch</uri>, which not only install the SDK and the drivers of the GeoMagic but also point to how to create the yarp drivers for the Geomagic;</p></list-item>
<list-item><p>a C&#x0002B;&#x0002B; module (<uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories/tree/master/CppProgram">https://github.com/inria-larsen/icubLearningTrajectories/tree/master/CppProgram</uri>) that connects the output command from the Geomagic to the iCub in Gazebo and eventually enables recording the trajectories on a file. A tutorial is included in this software.</p></list-item>
</list></p>
<p>The interconnection among the different modules is represented in Figure <xref ref-type="fig" rid="F5">5</xref>, where the Matlab module is not used. The tip of the Geomagic is virtually attached to the end effector of the robot:
<disp-formula id="E26"><mml:math id="M143"><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">geo</mml:mtext></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x02192;</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">icub_hand</mml:mtext></mml:mrow></mml:msub><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>When the operator moves the Geomagic, the position of the Geomagic tip <italic>x<sub>geo</sub></italic> is scaled (1:1 by default) in the iCub workspace as <italic>x<sub>icub_hand</sub></italic>, and the Cartesian controller is used to move the iCub hand around a &#x0201C;home&#x0201D; position, or default starting position:
<disp-formula id="E27"><mml:math id="M144"><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">icub_hand</mml:mtext></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext mathvariant="italic">hapticDriverMapping</mml:mtext><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mn>0</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">geo</mml:mtext></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
where <italic>hapticDriverMapping</italic> is the transformation applied by the haptic device driver, which essentially maps the axis from the Geomagic reference frame to the iCub reference frame. By default, no force feedback is sent back to the operator in this application, as we want to emulate the zero-torque control mode of the real iCub, where the robot is ideally transparent and not opposing any resistance to the human guidance. A default orientation of the hand (&#x0201C;katana&#x0201D; orientation) is set.</p>
</sec>
<sec id="S6-11">
<label>6.3</label> <title>Data Acquisition</title>
<p>The dark button of the Geomagic is used to start and stop the recording of the trajectories. The operator must click and hold the button during the whole movement and release the button at the end. The trajectory is saved on a file called <italic>recordX.txt</italic> for the <italic>X</italic>-th trajectory. The structure of this file is:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>&#x00023;time &#x00023;xgeo &#x00023;ygeo &#x00023;zgeo &#x00023;fx &#x00023;fy &#x00023;fz &#x00023;mx &#x00023;my &#x00023;mz &#x00023;x_icub_hand &#x00023;y_icub_hand &#x00023;z_icub_hand</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>5.96046e</monospace>&#x02212;<monospace>06</monospace> &#x02212;<monospace>0.0510954</monospace> &#x02212;<monospace>0.0127809</monospace> &#x02212;<monospace>0.0522504 0.284382</monospace> &#x02212;<monospace>0.0659538</monospace> &#x02212;<monospace>0.0239582</monospace> &#x02212;<monospace>0.0162418</monospace> &#x02212;<monospace>0.0290078</monospace> &#x02212;<monospace>0.0607215</monospace> &#x02212;<monospace>0.248905</monospace> &#x02212;<monospace>0.0872191 0.0477496&#x00024;</monospace></p></list-item>
</list>
</boxed-text></p>
<p>A video showing the iCub&#x02019;s arm moved by a user through the haptic device in Gazebo is available in Section <xref ref-type="sec" rid="S8">8</xref> (tutorial video). The graph in Figure <xref ref-type="fig" rid="F7">7</xref> represents some trajectories recorded with the Geomagic, corresponding to lifting the left arm of the iCub.</p>
<p>Demonstrated trajectories and their corresponding forces can be recorded directly from the robot, by accessing the Cartesian interface and the <italic>wholeBodyDynamicsTree</italic> module.<xref ref-type="fn" rid="fn13"><sup>13</sup></xref></p>
<p>In our project on Github, we provide the acquired dataset with the trajectories for the interested reader who wishes to test the code with these trajectories. Two datasets are available at <uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories/tree/master/MatlabProgram/Data/">https://github.com/inria-larsen/icubLearningTrajectories/tree/master/MatlabProgram/Data/</uri>: the first dataset called &#x0201C;heights&#x0201D; is composed of three goal-directed reaching tasks, where the targets vary in height; the second dataset called &#x0201C;FLT&#x0201D; is composed of trajectories recorded on the real robot, whose arms move forward, to the left and to the top.</p>
<p>A Matlab script that learns ProMPs with such kinds of datasets is available in the toolbox, called <monospace>demo_plotProMPs.m</monospace>. It contains all the following steps.</p>
<p>To load the first &#x0201C;heights&#x0201D; dataset with the three trajectories, write:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>t{1}</monospace> &#x0003D;<monospace>&#x02009;loadTrajectory(&#x02019;Data/heights/bottom&#x02019;, &#x02019;bottom&#x02019;, &#x02019;refNb&#x02019;, s_bar, &#x02019;nbInput&#x02019;, nbInput,</monospace> &#x02026; <monospace>&#x02019;Specific&#x02019;, &#x02019;FromGeom&#x02019;);</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>t{2}</monospace> &#x0003D;<monospace>&#x02009;loadTrajectory(&#x02019;Data/heights/top&#x02019;, &#x02019;top&#x02019;, &#x02019;refNb&#x02019;, s_bar, &#x02019;nbInput&#x02019;, nbInput,</monospace> &#x02026; <monospace>&#x02019;Specific&#x02019;, &#x02019;FromGeom&#x02019;);</monospace></p></list-item>
<list-item><label>3</label> <p><monospace>t{3}</monospace> &#x0003D;<monospace>&#x02009;loadTrajectory(&#x02019;Data/heights/middle&#x02019;, &#x02019;forward&#x02019;, &#x02019;refNb&#x02019;, s_bar, &#x02019;nbInput&#x02019;, nbInput,</monospace> &#x02026; <monospace>&#x02019;Specific&#x02019;, &#x02019;FromGeom&#x02019;);</monospace></p></list-item>
</list>
</boxed-text></p>
<p>Figure <xref ref-type="fig" rid="F7">7</xref> shows the three sets of demonstrated trajectories. In the used dataset called &#x0201C;heights,&#x0201D; we have recorded 40 trajectories per movement primitive.</p>
</sec>
<sec id="S6-12">
<label>6.4</label> <title>Learning the ProMPs</title>
<p>We need to first learn the ProMPs associated with the three observed movements. First, we partition the collected dataset into a training set and test dataset for the inference. One random trajectory for the inference is used:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>[train{i}, test{i}]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;partitionTrajectory(t{i}, 1, percentData, s_bar);</monospace></p></list-item>
</list>
</boxed-text></p>
<p>The second input parameter specifies that we select only one trajectory, randomly selected, to test the ProMP.</p>
<p>Now, we compute the three ProMPs with:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>promp{1}</monospace>&#x02009;&#x0003D;<monospace>&#x02009;computeDistribution(train{1}, M, s_bar, c, h);</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>promp{2}</monospace>&#x02009;&#x0003D;<monospace>&#x02009;computeDistribution(train{2}, M, s_bar, c, h);</monospace></p></list-item>
<list-item><label>3</label> <p><monospace>promp{3}</monospace>&#x02009;&#x0003D;<monospace>&#x02009;computeDistribution(train{3}, M, s_bar, c, h)</monospace></p></list-item>
</list>
</boxed-text></p>
<p>We set the following parameters:
<list list-type="bullet">
<list-item><p><monospace>s_bar</monospace>&#x02009;&#x0003D;<monospace>&#x02009;100</monospace>: reference number of samples, which we note in this article as <inline-formula><mml:math id="M145"><mml:mover accent='true'><mml:mi>s</mml:mi><mml:mo>&#x000AF;</mml:mo></mml:mover></mml:math></inline-formula>.</p></list-item>
<list-item><p><monospace>nbInput(1)</monospace>&#x02009;&#x0003D;<monospace>&#x02009;3; nbInput(2)</monospace>&#x02009;&#x0003D;<monospace>&#x02009;6</monospace>: dimension of the generic vector containing the state of the trajectories. It is composed of 3D Cartesian position and 6D forces and wrench information.<xref ref-type="fn" rid="fn14"><sup>14</sup></xref></p></list-item>
<list-item><p><monospace>M(1)</monospace>&#x02009;&#x0003D;<monospace>&#x02009;5; M(2)</monospace>&#x02009;&#x0003D;<monospace>&#x02009;5</monospace>: number of basis functions for each <monospace>nbInput</monospace> dimension.</p></list-item>
<list-item><p><monospace>c</monospace>&#x02009;&#x0003D;<monospace>&#x02009;1/M;h</monospace>&#x02009;&#x0003D;<monospace>&#x02009;1/(M&#x0002A;M)</monospace>: RBF parameters (see equation <xref ref-type="disp-formula" rid="E3">(2)</xref>).</p></list-item>
<list-item><p><monospace>expNoise</monospace>&#x02009;&#x0003D;<monospace>&#x02009;0.00001</monospace>: the expected data noise. We assume this noise to be very low, since this is a simulation.</p></list-item>
<list-item><p><monospace>percentData</monospace>&#x02009;&#x0003D;<monospace>&#x02009;40</monospace>: this variable specifies the percentage of the trajectory that the robot will be observed, before inferring the end.</p></list-item>
</list></p>
<p>These parameters can be changed at the beginning of the Matlab script.</p>
<p>Figure <xref ref-type="fig" rid="F8">8</xref> shows the three ProMPs of the reaching movements toward the three targets. To highlight the most useful dimension, we only plot the <italic>z</italic>-axis Cartesian position. However, each dimension is plotted by the Matlab script with:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>drawRecoverData(t{1}, inputName, &#x02019;Specolor&#x02019;, &#x02019;b&#x02019;, &#x02019;namFig&#x02019;, 1);</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>drawRecoverData(t{1}, inputName, &#x02019;Interval&#x02019;, [4 7 5 8 6 9], &#x02019;Specolor&#x02019;, &#x02019;b&#x02019;, &#x02019;namFig&#x02019;, 2);</monospace></p></list-item>
<list-item><label>3</label> <p><monospace>drawRecoverData(t{2}, inputName, &#x02019;Specolor&#x02019;, &#x02019;r&#x02019;, &#x02019;namFig&#x02019;, 1);</monospace></p></list-item>
<list-item><label>4</label> <p><monospace>drawRecoverData(t{2}, inputName, &#x02019;Interval&#x02019;, [4 7 5 8 6 9], &#x02019;Specolor&#x02019;, &#x02019;r&#x02019;, &#x02019;namFig&#x02019;, 2);</monospace></p></list-item>
<list-item><label>5</label> <p><monospace>drawRecoverData(t{3}, inputName, &#x02019;Specolor&#x02019;, &#x02019;g&#x02019;, &#x02019;namFig&#x02019;, 1);</monospace></p></list-item>
<list-item><label>6</label> <p><monospace>drawRecoverData(t{3}, inputName, &#x02019;Interval&#x02019;, [4 7 5 8 6 9], &#x02019;Specolor&#x02019;, &#x02019;g&#x02019;, &#x02019;namFig&#x02019;, 2);</monospace></p></list-item>
</list>
</boxed-text></p>
<fig position="float" id="F8">
<label>Figure 8</label>
<caption><p>The Cartesian position in the <italic>z</italic>-axis of the three ProMPs corresponding to reaching three targets. There are 39 trajectory demonstrations per each ProMPs with M&#x02009;&#x0003D;&#x02009;5 basis functions, <inline-formula><mml:math id="M146"><mml:mtext mathvariant="italic">c</mml:mtext><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mtext>1</mml:mtext></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">M</mml:mtext></mml:mrow></mml:mfrac><mml:mo class="MathClass-punc">,</mml:mo><mml:mtext mathvariant="italic">h</mml:mtext><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfrac><mml:mrow><mml:mtext>1</mml:mtext></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mtext mathvariant="italic">M</mml:mtext></mml:mrow><mml:mrow><mml:mtext>2</mml:mtext></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:math></inline-formula> and <inline-formula><mml:math id="M147"><mml:mover accent="true"><mml:mrow><mml:mtext mathvariant="italic">s</mml:mtext></mml:mrow><mml:mo class="MathClass-op">&#x000AF;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mtext>100</mml:mtext></mml:math></inline-formula>.</p></caption>
<graphic xlink:href="frobt-04-00045-g008.tif"/>
</fig>
</sec>
<sec id="S6-13">
<label>6.5</label> <title>Predicting the Desired Movement</title>
<p>Now that we have learned the different ProMPs, we can predict the end of a trajectory according to the early observation <italic>n<sub>o</sub></italic>. This number is computed from the variable <monospace>percentData</monospace> written at the beginning of the trajectory by: <inline-formula><mml:math id="M148"><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mfrac><mml:mrow><mml:mtext mathvariant="italic">percentData</mml:mtext></mml:mrow><mml:mrow><mml:mn>100</mml:mn></mml:mrow></mml:mfrac><mml:mo class="MathClass-bin">&#x02217;</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mtext mathvariant="italic">fi</mml:mtext></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0007C;</mml:mo></mml:math></inline-formula>, where <italic>i</italic> is the index of the test trajectory.</p>
<p>To prepare the prediction, the model the time modulation of each trajectory is computed with:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>w</monospace>&#x02009;&#x0003D;<monospace>&#x02009;computeAlpha(test.nbData, t, nbInput);</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>promp1.w_alpha</monospace>&#x02009;&#x0003D;<monospace>&#x02009;w1;</monospace></p></list-item>
<list-item><label>3</label> <p><monospace>promp2.w_alpha</monospace>&#x02009;&#x0003D;<monospace>&#x02009;w2;</monospace></p></list-item>
<list-item><label>4</label> <p><monospace>promp3.w_alpha</monospace>&#x02009;&#x0003D;<monospace>&#x02009;w3;</monospace></p></list-item>
</list>
</boxed-text></p>
<p>This model relies on the global variation of Cartesian position during the first <italic>n<sub>o</sub></italic> observations. The model&#x02019;s computations are explained in Section <xref ref-type="sec" rid="S3-7">3.4</xref>.</p>
<p>Now, to estimate the time modulation of the trajectory, call the function:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>[alphaTraj, type, x]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inferenceAlpha(promp, test{1}, M, s_bar, c, h, test{1}.nbData, expNoise, &#x02019;MO&#x02019;);</monospace></p></list-item>
</list>
</boxed-text></p>
<p> where <monospace>alphaTraj</monospace> contains the estimated time modulation <inline-formula><mml:math id="M149"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> and <monospace>type</monospace> gives the index of the recognized ProMP. The last parameter <monospace>x</monospace> is used for debugging purposes.</p>
<p>Using this estimation of the time modulation, the end of the trajectory is inferred with:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>infTraj</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inference(promp, test{1}, M, s_bar, c, h, test{1}.nbData, expNoise, alphaTraj);</monospace></p></list-item>
</list>
</boxed-text></p>
<p>As shown in the previous example, the quality of the prediction of the future trajectory depends on the accuracy of the time modulation estimation. This estimation is computed by calling the function:
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>%Using the model:</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>[alphaTraj, type, x]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inferenceAlpha(promp, test{1}, M, s_bar, c, h, test{1}.nbData, expNoise, &#x02019;MO&#x02019;);</monospace></p></list-item>
<list-item><label>3</label> <p><monospace>%Using the distance criteria:</monospace></p></list-item>
<list-item><label>4</label> <p><monospace>[alphaTraj, type, x]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inferenceAlpha(promp, test{1}, M, s_bar, c, h, test{1}.nbData, expNoise, &#x02019;DI&#x02019;);</monospace></p></list-item>
<list-item><label>5</label> <p><monospace>%Using the Maximum likelihood criteria:</monospace></p></list-item>
<list-item><label>6</label> <p><monospace>[alphaTraj, type, x]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;inferenceAlpha(promp, test{1}, M, s_bar, c, h, test{1}.nbData, expNoise, &#x02019;ML&#x02019;);</monospace></p></list-item>
<list-item><label>7</label> <p><monospace>%Using the mean of observed temporal modulation during learning:</monospace></p></list-item>
<list-item><label>8</label> <p><monospace>alphaTraj</monospace>&#x02009;&#x0003D;<monospace>&#x02009;(promp{1}.mu_alpha&#x02009;</monospace>&#x0002B;<monospace>&#x02009;promp{2}.mu_alpha&#x02009;</monospace>&#x0002B;<monospace>&#x02009;promp{3}. mu_alpha)/3.0;</monospace></p></list-item>
</list>
</boxed-text></p>
</sec>
<sec id="S6-14">
<label>6.6</label> <title>Predicting the Time Modulation</title>
<p>In Section <xref ref-type="sec" rid="S3-7">3.4</xref>, we presented four main methods for estimating the time modulation parameter, discussing why this is crucial for a better estimation of the trajectory. Here, we compare the methods on the three goals experiment. We recorded 40 trajectories for each movement primitive, for a total of 120 trajectories. After having computed the corresponding ProMPs, we tested the inference by providing early observations of a trajectory that the robot must finish. For that purpose, it recognizes the correct ProMP among the three precedently learned (see Section <xref ref-type="sec" rid="S3-8">3.5</xref>) and then it estimates the time modulation parameter <inline-formula><mml:math id="M150"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula>. Figure <xref ref-type="fig" rid="F9">9</xref> represents the average error of the <inline-formula><mml:math id="M151"><mml:mover accent='true'><mml:mi>&#x003B1;</mml:mi><mml:mo>&#x0005E;</mml:mo></mml:mover></mml:math></inline-formula> during inference for 10 trials according to the number of observations (from 30 to 90% of observed data) and according to the used method. These methods are the ones we have just presented before that we called mean (equation <xref ref-type="disp-formula" rid="E13">(11)</xref>), maximum likelihood (equation <xref ref-type="disp-formula" rid="E14">(12)</xref>), minimum distance (equation <xref ref-type="disp-formula" rid="E15">(13)</xref>) or model (equation <xref ref-type="disp-formula" rid="E16">(14)</xref>). Each time, the tested trajectory is chosen randomly from the data set of observed trajectories (of course, the test trajectory does not belong to the training set, so it was not used in the learning step). The method that takes the average of <italic>&#x003B1;</italic> observed during learning is taken as comparison (in black). We can see that other methods are more accurate. The <italic>maximum likelihood</italic> is increasingly more accurate, as expected. The fourth method (<italic>model</italic>) that models the <italic>&#x003B1;</italic> according to the global variation of the trajectory&#x02019;s positions during the early observations is the best performing when the portion of observed trajectory is small (e.g., 30&#x02013;50%). Since it is our interest to predict the future trajectory as early as possible, we adopted the <italic>model</italic> method for our experiments.</p>
<fig position="float" id="F9">
<label>Figure 9</label>
<caption><p>(Top left) Error of <italic>&#x003B1;</italic> estimation; (top right and bottom) error of trajectory prediction according to the number of known data and the method used. We executed 10 different trials for each case.</p></caption>
<graphic xlink:href="frobt-04-00045-g009.tif"/>
</fig>
</sec>
</sec>
<sec id="S7">
<label>7</label> <title>Application on the Real iCub</title>
<p>In this section, we present and discuss two experiments with the real robot iCub.</p>
<p>In the first, we take inspiration from the experiment of the previous Section <xref ref-type="sec" rid="S6">6</xref>, where the &#x0201C;tasks&#x0201D; are exemplified by simple point-to-point trajectories demonstrated by a human tutor. In this experiment, we explore how to use wrench information and use known demonstrations as ground truth, to evaluate the quality of our prediction.</p>
<p>In the second experiment, we set up a more realistic collaborative scenario, inspired by collaborative object sorting. In such applications, the robot is used to lift an object (heavy, or dangerous, or that the human cannot manipulate, as for some chemicals or food), the human inspects the object and then decides if it is accepted or rejected. Depending on this decision, the object goes on a tray or bin in front of the robot, or on a bin located on the robot side. Dropping the objects in two cases must be done in a different way. Realizing this application with iCub is not easy, as iCub cannot lift heavy objects and has a limited workspace. Therefore, we simplify the experiment with small objects and two bins. The human simply starts the robots movement with physical guidance, and then the robot finishes the movement on its own. In this experiment the predicted trajectories are validated on-the-fly by the human operator.</p>
<p>In a more complex collaborative scenario, tasks could be elementary tasks such as pointing, grasping, reaching, and manipulating tools (the type of task here is not important, as long as it can be represented by a trajectory).</p>
<sec id="S7-15">
<label>7.1</label> <title>Three Simple Actions with Wrench Information</title>
<p>Task trajectories, in this example, have both position and wrench information. In general, it is a good idea to represent collaborative motion primitives in terms of both position and wrenches, as this representation enables using them in the context of physical interaction. Contrarily to the simulated experiment, here the inferred wrenches <inline-formula><mml:math id="M152"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>F</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> correspond to the wrenches the robot should perceive if the partner was manually guiding the robot to perform the entire movement: indeed, these wrenches are computed from the demonstrations used to learn the primitive. The predicted wrenches can be used in different ways, depending on the application. For example, if the partner breaks the contact with the robot, the perceived wrenches will be different. If the robot is not equipped with tactile or contact sensors, this information can be used by the robot to &#x0201C;perceive&#x0201D; the contact breaking and interpret it, for example, as the sign that the human wants the robot to continue the task on its own. Another use for the demonstrated wrenches is for detecting abnormal forces while the robot is moving: this use can have different applications, from adapting the motion to new environment to automatically detecting new demonstrations. Here, they are simply used to detect when the partner breaks the contact with the robot, and the latter must continue the movement on its own.</p>
<p>In the following, we present how to realize the experiment for predicting the user intention with the real iCub, using our software. The robot must learn three task trajectories represented in Figure <xref ref-type="fig" rid="F10">10</xref>. In red, the first trajectory goes from an initial position in front of the robot to its left (task A). In green, the second trajectory goes from the same initial position to the top (task C). In blue, the last trajectory goes from the top position to the position on the left (task B).</p>
<fig position="float" id="F10">
<label>Figure 10</label>
<caption><p>Top left: the iCub and the visualization of the three targets in its workspace, defining the three tasks A&#x02013;B&#x02013;C. Top right: Cartesian position information of the demonstrated trajectories for the three tasks. Bottom left and right: wrench (force and moment) information of the demonstrated trajectories.</p></caption>
<graphic xlink:href="frobt-04-00045-g010.tif"/>
</fig>
<p>To provide the demonstrations for the tasks, the human tutor used three visual targets shown on the iCub_GUI, a basic module of the iCub code that provides a real-time synthetic and augmented view of the robot status, with arrows for the external forces and colored objects for the targets. One difficulty for novice users of iCub is to be able to drive the robot&#x02019;s arm making it perform desired complex 3D trajectories (Ivaldi et al., <xref ref-type="bibr" rid="B38">2017</xref>), but after some practice in moving the robot&#x02019;s arm the operator recorded all the demonstrations. We want to highlight that having variations in the starting or ending points of the trajectories is not at all a problem, since the ProMPs are able to deal with this variability.</p>
<p>We will see that by using the ProMPs method and by learning the end-effector Cartesian position, the robot will be able to learn distributions over trajectories, recognize when a movement belongs to one of these distributions, and infer the end of the movement.</p>
<p>In this experiment, the robot received 10 demonstrated trajectories per movement primitive, all provided by the same user. We recorded the Cartesian end-effector position and the wrenches of the robot&#x02019;s left arm. Data are retrieved using the function <monospace>used_functions/retrieveRealDataWithout</monospace> <monospace>Orientation.m</monospace>. The output parameters of this function are three objects (one per ProMP) that contain all the required information to learn the ProMPs.</p>
<p>In this function, the wrench information are filtered using a Matlab function called <monospace>envelope.m</monospace><xref ref-type="fn" rid="fn15"><sup>15</sup></xref>: for each trajectory <monospace>traj</monospace>and its subMatrix <italic>M</italic>&#x02009;&#x0003D;&#x02009;<italic>F</italic>([1: <italic>t</italic>]):
<boxed-text>
<list list-type="simple">
<list-item><label>1</label> <p><monospace>[envHigh, envLow]</monospace>&#x02009;&#x0003D;<monospace>&#x02009;envelope(traj.M);</monospace></p></list-item>
<list-item><label>2</label> <p><monospace>traj.M</monospace>&#x02009;&#x0003D;<monospace>&#x02009;(envHigh</monospace>&#x02009;&#x0002B;<monospace>&#x02009;envLow)/2;</monospace></p></list-item>
</list>
</boxed-text></p>
<p>These three objects are saved in <monospace>&#x02019;Data/realIcub.mat&#x02019;</monospace>. A Matlab script called <monospace>demo_plotProMPsIcub.m</monospace> recovers these data, using the function <monospace>load(&#x02019;Data/realIcub.mat&#x02019;)</monospace>. This script follows the same organization as the ones we previously explained in Sections <xref ref-type="sec" rid="S5">5</xref> and <xref ref-type="sec" rid="S6">6</xref>. By launching this script, the recovered data are plotted first.</p>
<p>Then, the ProMPs are computed and plotted, as presented in Figure <xref ref-type="fig" rid="F11">11</xref>. In this figure, the distributions are visibly overlaid:
<list list-type="bullet">
<list-item><p>during the whole trajectories duration for the wrench information;</p></list-item>
<list-item><p>during the 40% first samples of the trajectories for the Cartesian position information.</p></list-item>
</list></p>
<fig position="float" id="F11">
<label>Figure 11</label>
<caption><p>The ProMPs learned by the robot from the demonstrations of Figure <xref ref-type="fig" rid="F10">10</xref>.</p></caption>
<graphic xlink:href="frobt-04-00045-g011.tif"/>
</fig>
<p>After this learning step, the user chooses which ProMP to test. Using a variable that represents the percentage of observed data to be used for the inference, the script computes the number of early observations <italic>n<sub>o</sub></italic><xref ref-type="fn" rid="fn16"><sup>16</sup></xref> that will be measured by the robot. Using this number, the robot models the time modulation parameter <italic>&#x003B1;</italic><xref ref-type="fn" rid="fn17"><sup>17</sup></xref> of each ProMP, as explained in Section <xref ref-type="sec" rid="S3-7">3.4</xref>. Using this model, the time modulation of the test trajectory is estimated, and the corresponding ProMP is identified.</p>
<p>Then, the inference of the trajectory&#x02019;s target is performed. Figure <xref ref-type="fig" rid="F12">12</xref> represents the inference of the three tested trajectories when wrench information is not used by the robot to infer the trajectory. To realize this figure, with the comparison between the predicted trajectory and the ground truth, we applied our algorithm offline. In fact, it is not possible at time <italic>t</italic> to have the ground truth of the trajectory intended by the human from <italic>t</italic>&#x02009;&#x0002B;&#x02009;1 to <italic>t<sub>f</sub></italic>: even if we would tell to the human in advance the goal that he/she must reach for, the trajectory to reach that goal could vary. So, for the purpose of these figures and comparisons with the ground truth, we show here the offline evaluation: we select one demonstrated task trajectory from the test set (not the training set used to learn the ProMP) as ground truth, and imagine that this is the intended trajectory. In Figure <xref ref-type="fig" rid="F12">12</xref>, the ground truth is shown in black, whereas the portion of this trajectory that is fed to the inference, and that corresponds to the &#x0201C;early observations,&#x0201D; is represented with bigger black circles. We can see that the inference of the Cartesian position is correct, although we can see an error of about 1&#x02009;s of the estimated duration time for the last trial. Also, the wrench inference is not accurate. We can assume that it is: because the robot infers the trajectory using only position information without wrench information, or because the wrenches&#x02019; variation is not correlated to the position variation. To improve this result, we can make the inference using wrench in addition to Cartesian position information, as shown in Figure <xref ref-type="fig" rid="F13">13</xref>. We can see in this figure that the estimation of the trajectory&#x02019;s duration is accurate. The disadvantage is that the inference of the Cartesian position is less accurate because the posterior distribution computation makes a trade-off between fitting Cartesian position and wrench early observations. Moreover, to allow a correct inference using wrench information, the noise expectation must be increased to consider forces.<xref ref-type="fn" rid="fn18"><sup>18</sup></xref></p>
<fig position="float" id="F12">
<label>Figure 12</label>
<caption><p>The prediction of the future trajectory from the learned ProMPs computed from the position information for the 3-targets dataset on the real iCub (Figure <xref ref-type="fig" rid="F11">11</xref>) after 40% of observations.</p></caption>
<graphic xlink:href="frobt-04-00045-g012.tif"/>
</fig>
<fig position="float" id="F13">
<label>Figure 13</label>
<caption><p>The prediction of the future trajectory from the learned ProMPs computed from the position and wrench information for the 3-targets dataset on the real iCub (Figure <xref ref-type="fig" rid="F11">11</xref>) after 40% of observations.</p></caption>
<graphic xlink:href="frobt-04-00045-g013.tif"/>
</fig>
<p>To confirm these results, we analyzed the trajectory inference and <italic>&#x003B1;</italic> estimation considering different percentages of each trajectory as observed data (30&#x02013;90%). For each percentage, we performed 20 tests, with and without force information.</p>
<p>In Figure <xref ref-type="fig" rid="F14">14</xref>, each box-plot represents errors for 20 tests. On the top, the error criterion is the average distance between the inferred trajectory and the real one. We can see that the inference of Cartesian end-effector trajectory is more accurate without wrench information. On the bottom, the error criterion is the distance between the estimated <italic>&#x003B1;</italic> and the real one. We can see that using wrench information, the estimation of the <italic>&#x003B1;</italic> is more accurate. Thus, these two graphs confirm what we assumed from Figures <xref ref-type="fig" rid="F12">12</xref> and <xref ref-type="fig" rid="F13">13</xref>.</p>
<fig position="float" id="F14">
<label>Figure 14</label>
<caption><p>Trajectory prediction error (top) and time modulation estimation error (bottom) of the future trajectory with and without wrench information, for the 3-targets dataset on the real iCub (Figure <xref ref-type="fig" rid="F11">11</xref>) with respect to the number of observed data points.</p></caption>
<graphic xlink:href="frobt-04-00045-g014.tif"/>
</fig>
<p>Median, mean, and variance of the prediction errors, computed with the normalized root-mean-square error (NRMSE), are reported in Table S1 in Supplementary Material. The prediction error for the time modulation is a scalar: &#x0007C;&#x003B1;<sub>prediction</sub>&#x02009;&#x02212;&#x02009;&#x003B1;<sub>real</sub>&#x0007C;. The prediction error for the trajectory is computed by the NRMSE of &#x0007C;&#x0039E;<sub>prediction</sub>&#x02009;&#x02212;&#x02009;&#x0039E;<sub>real</sub>&#x0007C;.</p>
<p>In future upgrades for this application, we will probably use the wrench information only to estimate the time modulation parameter <italic>&#x003B1;</italic>, to have both the best inference of the intended trajectory and the best estimation of the time modulation parameter to combine the benefits of inference with and without wrench information.</p>
<p>Table S1 in Supplementary Material also reports the average time for computing the prediction of both time modulation and posterior distribution. The computation was performed in Matlab, on a single core laptop (no parallelization). While the computation time for the case &#x0201C;without wrenches&#x0201D; is fine for real-time application, using the wrench information delays the prediction and represents a limit for real-time applications if fast decisions have to taken by the robot. Computation time will be improved in the future works, with the implementation of the prediction in an iterative way.</p>
</sec>
<sec id="S7-16">
<label>7.2</label> <title>Collaborative Object Sorting</title>
<p>We realized another experiment with iCub, where the robot has to sort some objects in different bins (see Figure S2 in Supplementary Material). We have two main primitives: one for a bin located on the left of the robot, and one for the bin to the front. Dropping the object is done at different heights, with a different gesture that also has a different orientation of the hand. For this reason, the ProMP model consists of the Cartesian position of the hand <italic>X<sub>t</sub></italic>&#x02009;&#x0003D;&#x02009;[<italic>x<sub>t</sub></italic>, <italic>y<sub>t</sub></italic>, <italic>z<sub>t</sub></italic>]&#x02009;&#x02208;&#x02009;<italic>R</italic><sup>3</sup> and its orientation <italic>A<sub>t</sub></italic>&#x02009;&#x02208;&#x02009;<italic>R</italic><sup>4</sup>, expressed as a quaternion:
<disp-formula id="E28"><mml:math id="M153"><mml:msub><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>X</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mi>&#x003B1;</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mtext>&#x02009;</mml:mtext><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>As in the previous experiment, we first teach the robot the primitives by kinesthetic teaching, with a dozen of demonstrations. Then we start the robot movement: the human operator physically grabs the robot&#x02019;s arm and start the movement toward one of the bins. The robot&#x02019;s skin is used twice. First, to detect the contact when the human grabs the arm, which marks the beginning of the observations. Second, when the human breaks the contact with the arm, which marks the end of the observations. Using the first portion of the observed movement, the robot recognizes the current task that is being executed, predicts the future movement that is intended by the human, and then executes it on its own. In the video (see link in Section <xref ref-type="sec" rid="S8">8</xref>), we artificially introduced a pause to let the operator &#x0201C;validate&#x0201D; the predicted trajectory, using a visual feedback on the iCubGui. Figure S3 in Supplementary Material shows one of the predictions made by the robot after the human releases the arm. Of course in this case, we do not have a &#x0201C;ground truth&#x0201D; for the predicted trajectory, only a validation of the predicted trajectory by the operator.</p>
</sec>
</sec>
<sec id="S8">
<label>8</label> <title>Videos</title>
<p>We recorded several videos that complement the tutorials. The videos are presented in the github repository of our software: <uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories/tree/master/Videos">https://github.com/inria-larsen/icubLearningTrajectories/tree/master/Videos</uri>.</p>
</sec>
<sec id="S9" sec-type="discussion">
<label>9</label> <title>Discussion</title>
<p>While we believe that our proposed method is principled and has several advantages for predicting intention in human&#x02013;robot interaction, there are numerous improvements that can be done. Some will be object of our future works.</p>
<sec id="S9-17">
<label>9.1</label> <title>Improving the Estimation of the Time Modulation</title>
<p>Our experiments showed that estimating the time modulation parameter <italic>&#x003B1;</italic>, determining the duration of the trajectory, greatly improves the prediction of the trajectory in terms of difference with the human intended trajectory (i.e., our ground truth). We proposed four simple methods in Section <xref ref-type="sec" rid="S3-7">3.4</xref>, and in the iCub experiment, we showed that the method that maps the time modulation and the variation of the trajectory in the first <italic>n<sub>o</sub></italic> observations provides a good estimate of the time modulation <italic>&#x003B1;</italic> for our specific application. However, it is an <italic>ad hoc</italic> model that cannot be generalized to all possible cases. Overall, the estimation of the time modulation (or phase) can be improved. For example, Maeda et al. (<xref ref-type="bibr" rid="B50">2016</xref>) used Dynamic Time Warping, while Ewerton et al. (<xref ref-type="bibr" rid="B24">2015</xref>) proposed to improve the estimation by having local estimations of the speed in the execution of the trajectory, to comply with cases where the velocity of task trajectory may not be constant throughout the task execution. In the future, we plan to explore more solutions and integrate them into our software.</p>
</sec>
<sec id="S9-18">
<label>9.2</label> <title>Improving Prediction</title>
<p>Another point that needs further investigation and improvement is how to improve the prediction of the trajectories exploiting different information. In our experiment with iCub, we improved the estimation of the time modulation using position and wrench information; however, we observed that the noisy wrench information does not help in improving the prediction of the position trajectory. One improvement is to certainly exploit more information from the demonstrated trajectories, such as estimating the different noise of every trajectory component and exploiting this information to improve the prediction. Another possible improvement would consist in using contextual information about the task trajectories. Finally, it would be interesting to try to identify automatically the characteristic such as velocity profiles or accelerations, which are renown to play a key role in attributing intentions to human movements. For example, in goal-directed tasks such as reaching, the arm velocity profile, and the hand configuration are cues that helps us detect intentions. Extracting these cues automatically, leveraging the estimation of the time modulation, would probably improve the prediction of the future trajectory. This is a research topic on its own, outside the scope of this article, with strong links to human motor control.</p>
</sec>
<sec id="S9-19">
<label>9.3</label> <title>Continuous Prediction</title>
<p>In Section <xref ref-type="sec" rid="S3-8">3.5</xref>, we described how to compute the prediction of the future trajectory after recognizing the current task. However, we did not explore what happens if the task recognition is wrong: this may happen, if there are two or more task with a similar trajectory at the beginning (e.g., moving the object from the same initial point toward one of four possible targets), or simply because there were not enough observed points. So what happens if our task recognition is wrong? How to re-decide on a previously identified task? And how should the robot decide if its current prediction is finally correct (in statistical terms)? While implementing a continuous recognition and prediction is easy with our framework (one has simply to do the estimation at each time step), providing a generic answer to these question may not be straightforward. Re-deciding about the current task implies also changing the prediction of the future trajectory. If the decision does not come with a confidence level greater than a desired value, then the robot could face a stall: if asked to continue the movement but unsure about the future trajectory, should it continue or stop? The choice may be application dependent. We will address these issues and the continuous prediction in future works.</p>
</sec>
<sec id="S9-20">
<label>9.4</label> <title>Improving Computational Time</title>
<p>Finally, we plan to improve the computational time for the inference and the portability of our software by porting the entire framework in C&#x0002B;&#x0002B;.</p>
</sec>
<sec id="S9-21">
<label>9.5</label> <title>Learning Tasks with Objects</title>
<p>In many collaborative scenarios, such as object carrying and cooperative assembly, the physical interaction between the human and the robot is mediated by objects. In these cases, if specific manipulations must be done on the objects, our method still applies, but not only on the robot. It must be adapted to the new &#x0201C;augmented system&#x0201D; consisting of robot and object. Typically, we could image a trajectory for some frame or variable or point of interest for the object and learn the corresponding task. Since ProMPs support multiplication and sequencing of primitives, we could exploit the properties of the ProMPs to learn the joint distribution of the robot task trajectories and the object task trajectories.</p>
</sec>
</sec>
<sec id="S10">
<label>10</label> <title>Conclusion</title>
<p>In this article, we propose a method for predicting the intention of a user physically interacting with the iCub in a collaborative task. We formalize the intention prediction as predicting the target and &#x0201C;future&#x0201D; intended trajectory from early observations of the task trajectory, modeled by Probabilistic Movement Primitives (ProMPs). We use ProMPs because they capture the variability of the task, in the form of a distribution of trajectories coming from several demonstrations of the task. From the information provided by the ProMP, we are able to compute the future trajectory by conditioning the ProMP to match the early observed data points. Additional features of our method are the estimation of the duration of the intended movement, the recognition of the current task among the many known in advance, and multimodal prediction.</p>
<p>Section <xref ref-type="sec" rid="S3">3</xref> described the theoretical framework, whereas Sections <xref ref-type="sec" rid="S4">4</xref>&#x02013;<xref ref-type="sec" rid="S7">7</xref> presented the open-source software that provides the implementation of the proposed method. The software is available on <monospace>github</monospace>, and tutorials and videos are provided.</p>
<p>We used three examples of increasing complexity to show how to use our method for predicting the intention of the human in collaborative tasks, exploiting the different features. We presented experiments with both the real and the simulated iCub. In our experiments, the robot learns a set of motion primitives corresponding to different tasks, from several demonstrations provided by a user. The resulting ProMPs are the prior information that is later used to make inferences about human intention. When the human starts a new collaborative task, the robot uses the early observations to infer which task the human is executing and predicts the trajectory that the human intends to execute. When the human releases the robot, the predicted trajectory is used by the robot to continue executing the task on its own.</p>
<p>In Section <xref ref-type="sec" rid="S9">9</xref>, we discussed some current issues and challenges for improving the proposed method and make it applicable to a wider repertoire of collaborative human&#x02013;robot scenarios. In our future works, our priority would be in accelerating the time for computing the inference and finding a principled way to do continuous estimation, by letting the robot re-decide continuously about the current task and future trajectory.</p>
</sec>
<sec id="S11">
<title>Author Contributions</title>
<p>Designed study: OD, AP, FC, and SI. Wrote software: OD, ME, AP, and SI. Wrote paper: OD, AP, ME, FC, JP, and SI.</p>
</sec>
<sec id="S12">
<title>Conflict of Interest Statement</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
</body>
<back>
<ack>
<p>The authors wish to thank the IIT researchers of the CoDyCo project for their support with iCub, Ugo Pattacini and Olivier Rochel for their help with the software for the Geomagic, and I&#x000F1;aki Fern&#x000E1;ndez P&#x000E9;rez for all his relevant feedback.</p>
</ack>
<sec id="S13">
<title>Funding</title>
<p>This study was partially funded by the European projects CoDyCo (no. 600716 ICT211.2.1) and AnDy (no. 731540 H2020-ICT-2016-1) and the French CPER project SCIARAT.</p>
</sec>
<sec id="S14">
<title>Supplementary Material</title>
<p>The Supplementary Material for this article can be found online at <uri xlink:href="http://journal.frontiersin.org/article/10.3389/frobt.2017.00045/full&#x00023;supplementary-material">http://journal.frontiersin.org/article/10.3389/frobt.2017.00045/full&#x00023;supplementary-material</uri>.</p>
<supplementary-material xlink:href="image_1.eps" id="SM1" mimetype="applicationn/eps" xmlns:xlink="http://www.w3.org/1999/xlink"/>
<supplementary-material xlink:href="image_2.pdf" id="SM2" mimetype="applicationn/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
<supplementary-material xlink:href="image_3.pdf" id="SM3" mimetype="applicationn/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
<supplementary-material xlink:href="image_5.pdf" id="SM4" mimetype="applicationn/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
<supplementary-material xlink:href="table_3.pdf" id="SM5" mimetype="applicationn/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Alami</surname> <given-names>R.</given-names></name> <name><surname>Clodic</surname> <given-names>A.</given-names></name> <name><surname>Montreuil</surname> <given-names>V.</given-names></name> <name><surname>Sisbot</surname> <given-names>E. A.</given-names></name> <name><surname>Chatila</surname> <given-names>R.</given-names></name></person-group> (<year>2006</year>). &#x0201C;<article-title>Toward human-aware robot task planning</article-title>,&#x0201D; in <conf-name>AAAI Spring Symposium: To Boldly Go Where No Human-Robot Team Has Gone Before</conf-name>, <conf-loc>Beijing</conf-loc>, <fpage>39</fpage>&#x02013;<lpage>46</lpage>.</citation></ref>
<ref id="B2"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Amor</surname> <given-names>H. B.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name> <name><surname>Kamthe</surname> <given-names>S.</given-names></name> <name><surname>Kroemer</surname> <given-names>O.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2014</year>). &#x0201C;<article-title>Interaction primitives for human-robot cooperation tasks</article-title>,&#x0201D; in <conf-name>Robotics and Automation (ICRA), 2014 IEEE International Conference on</conf-name> (<conf-loc>Hong Kong</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>2831</fpage>&#x02013;<lpage>2837</lpage>.</citation></ref>
<ref id="B3"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Baraglia</surname> <given-names>J.</given-names></name> <name><surname>Cakmak</surname> <given-names>M.</given-names></name> <name><surname>Nagai</surname> <given-names>Y.</given-names></name> <name><surname>Rao</surname> <given-names>R.</given-names></name> <name><surname>Asada</surname> <given-names>M.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Initiative in robot assistance during collaborative task execution</article-title>,&#x0201D; in <conf-name>Human-Robot Interaction (HRI), 2016 11th ACM/IEEE International Conference on</conf-name> (<conf-loc>Christchurch</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>67</fpage>&#x02013;<lpage>74</lpage>.</citation></ref>
<ref id="B4"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Billard</surname> <given-names>A.</given-names></name> <name><surname>Mataric</surname> <given-names>M. J.</given-names></name></person-group> (<year>2001</year>). <article-title>Learning human arm movements by imitation: evaluation of a biologically inspired connectionist architecture</article-title>. <source>Rob. Auton. Syst.</source> <volume>37</volume>, <fpage>145</fpage>&#x02013;<lpage>160</lpage>.<pub-id pub-id-type="doi">10.1016/S0921-8890(01)00155-5</pub-id></citation></ref>
<ref id="B5"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Bishop</surname> <given-names>C. M.</given-names></name></person-group> (<year>2006</year>). <source>Pattern Recognition and Machine Learning (Information Science and Statistics)</source>. <publisher-loc>Secaucus, NJ</publisher-loc>: <publisher-name>Springer-Verlag New York, Inc.</publisher-name></citation></ref>
<ref id="B6"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Busch</surname> <given-names>B.</given-names></name> <name><surname>Grizou</surname> <given-names>J.</given-names></name> <name><surname>Lopes</surname> <given-names>M.</given-names></name> <name><surname>Stulp</surname> <given-names>F.</given-names></name></person-group> (<year>2017</year>). <article-title>Learning legible motion from human&#x02013;robot interactions</article-title>. <source>Int. J. Soc. Robot.</source> <fpage>1</fpage>&#x02013;<lpage>15</lpage>.<pub-id pub-id-type="doi">10.1007/s12369-017-0400-4</pub-id></citation></ref>
<ref id="B7"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Buxton</surname> <given-names>H.</given-names></name></person-group> (<year>2003</year>). <article-title>Learning and understanding dynamic scene activity: a review</article-title>. <source>Image Vision Comput.</source> <volume>21</volume>, <fpage>125</fpage>&#x02013;<lpage>136</lpage>.<pub-id pub-id-type="doi">10.1016/S0262-8856(02)00127-0</pub-id></citation></ref>
<ref id="B8"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Calinon</surname> <given-names>S.</given-names></name></person-group> (<year>2015</year>). <source>pbdlib-matlab</source>. Available at: <uri xlink:href="https://gitlab.idiap.ch/rli/pbdlib-matlab/">https://gitlab.idiap.ch/rli/pbdlib-matlab/</uri></citation></ref>
<ref id="B9"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Calinon</surname> <given-names>S.</given-names></name></person-group> (<year>2016</year>). <article-title>A tutorial on task-parameterized movement learning and retrieval</article-title>. <source>Intell. Serv. Robot.</source> <volume>9</volume>, <fpage>1</fpage>&#x02013;<lpage>29</lpage>.<pub-id pub-id-type="doi">10.1007/s11370-015-0187-9</pub-id></citation></ref>
<ref id="B10"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Bruno</surname> <given-names>D.</given-names></name> <name><surname>Caldwell</surname> <given-names>D. G.</given-names></name></person-group> (<year>2014</year>). &#x0201C;<article-title>A task-parameterized probabilistic model with minimal intervention control</article-title>,&#x0201D; in <conf-name>IEEE International Conference on Robotics and Automation (ICRA)</conf-name>, <conf-loc>Hong Kong</conf-loc>, <fpage>3339</fpage>&#x02013;<lpage>3344</lpage>.</citation></ref>
<ref id="B11"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Li</surname> <given-names>Z.</given-names></name> <name><surname>Alizadeh</surname> <given-names>T.</given-names></name> <name><surname>Tsagarakis</surname> <given-names>N. G.</given-names></name> <name><surname>Caldwell</surname> <given-names>D. G.</given-names></name></person-group> (<year>2012a</year>). <source>Statistical Dynamical Systems for Skills Acquisition in Humanoids</source>. Available at: <uri xlink:href="http://www.calinon.ch/showPubli.php?publi&#x0003D;3031">http://www.calinon.ch/showPubli.php?publi&#x0003D;3031</uri></citation></ref>
<ref id="B12"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Li</surname> <given-names>Z.</given-names></name> <name><surname>Alizadeh</surname> <given-names>T.</given-names></name> <name><surname>Tsagarakis</surname> <given-names>N. G.</given-names></name> <name><surname>Caldwell</surname> <given-names>D. G.</given-names></name></person-group> (<year>2012b</year>). &#x0201C;<article-title>Statistical dynamical systems for skills acquisition in humanoids</article-title>,&#x0201D; in <source>Proc. IEEE Intl Conf. on Humanoid Robots (Humanoids)</source>, <publisher-loc>Osaka, Japan</publisher-loc>, <fpage>323</fpage>&#x02013;<lpage>329</lpage>.</citation></ref>
<ref id="B13"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Carlson</surname> <given-names>T.</given-names></name> <name><surname>Demiris</surname> <given-names>Y.</given-names></name></person-group> (<year>2008</year>). &#x0201C;<article-title>Human-wheelchair collaboration through prediction of intention and adaptive assistance</article-title>,&#x0201D; in <conf-name>Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on</conf-name> (<conf-loc>Pasadena</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>3926</fpage>&#x02013;<lpage>3931</lpage>.</citation></ref>
<ref id="B14"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Caron</surname> <given-names>S.</given-names></name> <name><surname>Kheddar</surname> <given-names>A.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Multi-contact walking pattern generation based on model preview control of 3d com accelerations</article-title>,&#x0201D; in <conf-name>Humanoid Robots, 2016 IEEE-RAS International Conference on</conf-name>, <conf-loc>Cancun</conf-loc>.</citation></ref>
<ref id="B15"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Csibra</surname> <given-names>G.</given-names></name> <name><surname>Gergely</surname> <given-names>G.</given-names></name></person-group> (<year>2007</year>). <article-title>&#x02018;Obsessed with goals&#x02019;: functions and mechanisms of teleological interpretation of actions in humans</article-title>. <source>Acta Psychol.</source> <volume>124</volume>, <fpage>60</fpage>&#x02013;<lpage>78</lpage>.<pub-id pub-id-type="doi">10.1016/j.actpsy.2006.09.007</pub-id><pub-id pub-id-type="pmid">17081489</pub-id></citation></ref>
<ref id="B16"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Demiris</surname> <given-names>Y.</given-names></name></person-group> (<year>2007</year>). <article-title>Prediction of intent in robotics and multi-agent systems</article-title>. <source>Cogn. Process.</source> <volume>8</volume>, <fpage>151</fpage>&#x02013;<lpage>158</lpage>.<pub-id pub-id-type="doi">10.1007/s10339-007-0168-9</pub-id><pub-id pub-id-type="pmid">17479306</pub-id></citation></ref>
<ref id="B17"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Dermy</surname> <given-names>O.</given-names></name></person-group> (<year>2017</year>). <source>icubLearningTrajectories</source>. Available at: <uri xlink:href="https://github.com/inria-larsen/icubLearningTrajectories">https://github.com/inria-larsen/icubLearningTrajectories</uri></citation></ref>
<ref id="B18"><citation citation-type="web"><person-group person-group-type="author"><name><surname>DeWolf</surname> <given-names>T.</given-names></name></person-group> (<year>2013</year>). <source>pydmps</source>. Available at: <uri xlink:href="https://github.com/studywolf/pydmps">https://github.com/studywolf/pydmps</uri></citation></ref>
<ref id="B19"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Dragan</surname> <given-names>A.</given-names></name> <name><surname>Srinivasa</surname> <given-names>S.</given-names></name></person-group> (<year>2013</year>). &#x0201C;<article-title>Generating legible motion</article-title>,&#x0201D; in <conf-name>Proceedings of Robotics: Science and Systems</conf-name>, <conf-loc>Berlin, Germany</conf-loc>.</citation></ref>
<ref id="B20"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dragan</surname> <given-names>A.</given-names></name> <name><surname>Srinivasa</surname> <given-names>S.</given-names></name></person-group> (<year>2014</year>). <article-title>Integrating human observer inferences into robot motion planning</article-title>. <source>Auton. Robots</source> <volume>37</volume>, <fpage>351</fpage>&#x02013;<lpage>368</lpage>.<pub-id pub-id-type="doi">10.1007/s10514-014-9408-x</pub-id></citation></ref>
<ref id="B21"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Dumora</surname> <given-names>J.</given-names></name> <name><surname>Geffard</surname> <given-names>F.</given-names></name> <name><surname>Bidard</surname> <given-names>C.</given-names></name> <name><surname>Aspragathos</surname> <given-names>N. A.</given-names></name> <name><surname>Fraisse</surname> <given-names>P.</given-names></name></person-group> (<year>2013</year>). &#x0201C;<article-title>Robot assistance selection for large object manipulation with a human</article-title>,&#x0201D; in <conf-name>IEEE International Conference on Systems, Man, and Cybernetics</conf-name>, <conf-loc>Manchester</conf-loc>, <fpage>1828</fpage>&#x02013;<lpage>1833</lpage>.</citation></ref>
<ref id="B22"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Evrard</surname> <given-names>P.</given-names></name> <name><surname>Gribovskaya</surname> <given-names>E.</given-names></name> <name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Billard</surname> <given-names>A.</given-names></name> <name><surname>Kheddar</surname> <given-names>A.</given-names></name></person-group> (<year>2009</year>). &#x0201C;<article-title>Teaching physical collaborative tasks: object-lifting case study with a humanoid</article-title>,&#x0201D; in <conf-name>Humanoid Robots, 2009. Humanoids 2009. 9th IEEE-RAS International Conference on</conf-name> (<conf-loc>Paris</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>399</fpage>&#x02013;<lpage>404</lpage>.</citation></ref>
<ref id="B23"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Ewerton</surname> <given-names>M.</given-names></name></person-group> (<year>2016</year>). <source>Learning Motor Skills from Partially Observed Movements Executed at Different Speeds</source>. Available at: <uri xlink:href="https://github.com/studywolf/pydmps">https://github.com/studywolf/pydmps</uri></citation></ref>
<ref id="B24"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ewerton</surname> <given-names>M.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name> <name><surname>Lioutikov</surname> <given-names>R.</given-names></name> <name><surname>Ben Amor</surname> <given-names>H.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name> <name><surname>Maeda</surname> <given-names>G.</given-names></name></person-group> (<year>2015</year>). &#x0201C;<article-title>Learning multiple collaborative tasks with a mixture of interaction primitives</article-title>,&#x0201D; in <conf-name>Robotics and Automation (ICRA), 2015 IEEE International Conference on</conf-name> (<conf-loc>Seattle</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>1535</fpage>&#x02013;<lpage>1542</lpage>.</citation></ref>
<ref id="B25"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ferrer</surname> <given-names>G.</given-names></name> <name><surname>Sanfeliu</surname> <given-names>A.</given-names></name></person-group> (<year>2014</year>). <article-title>Bayesian human motion intentionality prediction in urban environments</article-title>. <source>Pattern Recognit. Lett.</source> <volume>44</volume>, <fpage>134</fpage>&#x02013;<lpage>140</lpage>.<pub-id pub-id-type="doi">10.1016/j.patrec.2013.08.013</pub-id></citation></ref>
<ref id="B26"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fine</surname> <given-names>S.</given-names></name> <name><surname>Singer</surname> <given-names>Y.</given-names></name> <name><surname>Tishby</surname> <given-names>N.</given-names></name></person-group> (<year>1998</year>). <article-title>The hierarchical hidden Markov model: analysis and applications</article-title>. <source>Mach. Learn.</source> <volume>32</volume>, <fpage>41</fpage>&#x02013;<lpage>62</lpage>.<pub-id pub-id-type="doi">10.1023/A:1007469218079</pub-id></citation></ref>
<ref id="B27"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fitts</surname> <given-names>P. M.</given-names></name></person-group> (<year>1992</year>). <article-title>The information capacity of the human motor system in controlling the amplitude of movement</article-title>. <source>J. Exp. Psychol. Gen.</source> <volume>121</volume>, <fpage>262</fpage>.<pub-id pub-id-type="doi">10.1037/0096-3445.121.3.262</pub-id></citation></ref>
<ref id="B28"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fumagalli</surname> <given-names>M.</given-names></name> <name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Randazzo</surname> <given-names>M.</given-names></name> <name><surname>Natale</surname> <given-names>L.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name> <etal/></person-group> (<year>2012</year>). <article-title>Force feedback exploiting tactile and proximal force/torque sensing</article-title>. <source>Auton. Robots</source> <volume>33</volume>, <fpage>381</fpage>&#x02013;<lpage>398</lpage>.<pub-id pub-id-type="doi">10.1007/s10514-012-9291-2</pub-id></citation></ref>
<ref id="B29"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Gribovskaya</surname> <given-names>E.</given-names></name> <name><surname>Kheddar</surname> <given-names>A.</given-names></name> <name><surname>Billard</surname> <given-names>A.</given-names></name></person-group> (<year>2011</year>). &#x0201C;<article-title>Motion learning and adaptive impedance for robot control during physical interaction with humans</article-title>,&#x0201D; in <conf-name>Robotics and Automation (ICRA), 2011 IEEE International Conference on</conf-name> (<conf-loc>Shanghai</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>4326</fpage>&#x02013;<lpage>4332</lpage>.</citation></ref>
<ref id="B30"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Hersch</surname> <given-names>M.</given-names></name> <name><surname>Guenter</surname> <given-names>F.</given-names></name> <name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Billard</surname></name></person-group>. (<year>2008</year>). <source>Dynamical System Modulation for Robot Adaptive Learning via Kinesthetic Demonstrations</source>. Available at: <uri xlink:href="http://lasa.epfl.ch/sourcecode/counter.php?ID&#x0003D;11&#x00026;index&#x0003D;1">http://lasa.epfl.ch/sourcecode/counter.php?ID&#x0003D;11&#x00026;index&#x0003D;1</uri></citation></ref>
<ref id="B31"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Hoffman</surname> <given-names>G.</given-names></name></person-group> (<year>2010</year>). &#x0201C;<article-title>Anticipation in human-robot interaction</article-title>,&#x0201D; in <conf-name>AAAI Spring Symposium: It&#x02019;s All in the Timing</conf-name>, <conf-loc>Palo Alto, CA</conf-loc>.</citation></ref>
<ref id="B32"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Huang</surname> <given-names>S. H.</given-names></name> <name><surname>Held</surname> <given-names>D.</given-names></name> <name><surname>Abbeel</surname> <given-names>P.</given-names></name> <name><surname>Dragan</surname> <given-names>A. D.</given-names></name></person-group> (<year>2017</year>). <article-title>Enabling robots to communicate their objectives</article-title>. <source>CoRR</source>. abs/1702.03465. Available at: <uri xlink:href="http://arxiv.org/abs/1702.03465">http://arxiv.org/abs/1702.03465</uri></citation></ref>
<ref id="B33"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ijspeert</surname> <given-names>A. J.</given-names></name> <name><surname>Nakanishi</surname> <given-names>J.</given-names></name> <name><surname>Hoffmann</surname> <given-names>H.</given-names></name> <name><surname>Pastor</surname> <given-names>P.</given-names></name> <name><surname>Schaal</surname> <given-names>S.</given-names></name></person-group> (<year>2013</year>). <article-title>Dynamical movement primitives: learning attractor models for motor behaviors</article-title>. <source>Neural Comput.</source> <volume>25</volume>, <fpage>328</fpage>&#x02013;<lpage>373</lpage>.<pub-id pub-id-type="doi">10.1162/NECO_a_00393</pub-id><pub-id pub-id-type="pmid">23148415</pub-id></citation></ref>
<ref id="B34"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Anzalone</surname> <given-names>S.</given-names></name> <name><surname>Rousseau</surname> <given-names>W.</given-names></name> <name><surname>Sigaud</surname> <given-names>O.</given-names></name> <name><surname>Chetouani</surname> <given-names>M.</given-names></name></person-group> (<year>2014a</year>). <article-title>Robot initiative in a team learning task increases the rhythm of interaction but not the perceived engagement</article-title>. <source>Front. Neurorobot.</source> <volume>8</volume>:<fpage>5</fpage>.<pub-id pub-id-type="doi">10.3389/fnbot.2014.00005</pub-id></citation></ref>
<ref id="B35"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Nguyen</surname> <given-names>S. M.</given-names></name> <name><surname>Lyubova</surname> <given-names>N.</given-names></name> <name><surname>Droniou</surname> <given-names>A.</given-names></name> <name><surname>Padois</surname> <given-names>V.</given-names></name> <name><surname>Filliat</surname> <given-names>D.</given-names></name> <etal/></person-group> (<year>2014b</year>). <article-title>Object learning through active exploration</article-title>. <source>IEEE Trans. Auton. Ment. Dev.</source> <volume>6</volume>, <fpage>56</fpage>&#x02013;<lpage>72</lpage>.<pub-id pub-id-type="doi">10.1109/TAMD.2013.2280614</pub-id></citation></ref>
<ref id="B36"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Fumagalli</surname> <given-names>M.</given-names></name> <name><surname>Nori</surname> <given-names>F.</given-names></name> <name><surname>Baglietto</surname> <given-names>M.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2010</year>). &#x0201C;<article-title>Approximate optimal control for reaching and trajectory planning in a humanoid robot</article-title>,&#x0201D; in <conf-name>Proc. of the 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems &#x02013; IROS</conf-name>, <conf-loc>Taipei, Taiwan</conf-loc>, <fpage>1290</fpage>&#x02013;<lpage>1296</lpage>.</citation></ref>
<ref id="B37"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Fumagalli</surname> <given-names>M.</given-names></name> <name><surname>Randazzo</surname> <given-names>M.</given-names></name> <name><surname>Nori</surname> <given-names>F.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2011</year>). &#x0201C;<article-title>Computing robot internal/external wrenches by means of inertial, tactile and f/t sensors: theory and implementation on the icub</article-title>,&#x0201D; in <conf-name>Humanoid Robots (Humanoids), 2011 11th IEEE-RAS International Conference on</conf-name> (<conf-loc>Bled</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>521</fpage>&#x02013;<lpage>528</lpage>.</citation></ref>
<ref id="B38"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Lefort</surname> <given-names>S.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name> <name><surname>Chetouani</surname> <given-names>M.</given-names></name> <name><surname>Provasi</surname> <given-names>J.</given-names></name> <name><surname>Zibetti</surname> <given-names>E.</given-names></name></person-group> (<year>2017</year>). <article-title>Towards engagement models that consider individual factors in HRI: on the relation of extroversion and negative attitude towards robots to gaze and speech during a human-robot assembly task</article-title>. <source>Int. J. Soc. Robot.</source> <volume>9</volume>, <fpage>63</fpage>&#x02013;<lpage>86</lpage>.<pub-id pub-id-type="doi">10.1007/s12369-016-0357-8</pub-id></citation></ref>
<ref id="B39"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jamone</surname> <given-names>L.</given-names></name> <name><surname>Ugur</surname> <given-names>E.</given-names></name> <name><surname>Cangelosi</surname> <given-names>A.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name> <name><surname>Bernardino</surname> <given-names>A.</given-names></name> <name><surname>Piater</surname> <given-names>J.</given-names></name> <etal/></person-group> (<year>2017</year>). <article-title>Affordances in psychology, neuroscience and robotics: a survey</article-title>. <source>IEEE Trans. Cognit. Dev. Syst.</source> <volume>99</volume>, <fpage>1</fpage>.<pub-id pub-id-type="doi">10.1109/TCDS.2016.2594134</pub-id></citation></ref>
<ref id="B40"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Jarrass&#x000E9;</surname> <given-names>N.</given-names></name> <name><surname>Paik</surname> <given-names>J.</given-names></name> <name><surname>Pasqui</surname> <given-names>V.</given-names></name> <name><surname>Morel</surname> <given-names>G.</given-names></name></person-group> (<year>2008</year>). &#x0201C;<article-title>How can human motion prediction increase transparency?</article-title>,&#x0201D; in <conf-name>Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on</conf-name> (<conf-loc>Pasadena, CA</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>2134</fpage>&#x02013;<lpage>2139</lpage>.</citation></ref>
<ref id="B41"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Keogh</surname> <given-names>E.</given-names></name></person-group> (<year>2002</year>). &#x0201C;<article-title>Exact indexing of dynamic time warping</article-title>,&#x0201D; in <conf-name>Proceedings of the 28th International Conference on Very Large Data Bases</conf-name> (<conf-loc>Hong Kong</conf-loc>: <conf-sponsor>VLDB Endowment</conf-sponsor>), <fpage>406</fpage>&#x02013;<lpage>417</lpage>.</citation></ref>
<ref id="B42"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Khansari</surname> <given-names>M.</given-names></name></person-group> (<year>2011</year>). <source>Dynamical Systems Approach to Learn Robot Motions</source>. Available at: <uri xlink:href="https://bitbucket.org/khansari/seds">https://bitbucket.org/khansari/seds</uri></citation></ref>
<ref id="B43"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khansari-Zadeh</surname> <given-names>S. M.</given-names></name> <name><surname>Billard</surname> <given-names>A.</given-names></name></person-group> (<year>2011</year>). <article-title>Learning stable nonlinear dynamical systems with gaussian mixture models</article-title>. <source>IEEE Trans. Robot.</source> <volume>27</volume>, <fpage>943</fpage>&#x02013;<lpage>957</lpage>.<pub-id pub-id-type="doi">10.1109/TRO.2011.2159412</pub-id></citation></ref>
<ref id="B44"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khansari-Zadeh</surname> <given-names>S. M.</given-names></name> <name><surname>Billard</surname> <given-names>A.</given-names></name></person-group> (<year>2012</year>). <article-title>A dynamical system approach to realtime obstacle avoidance</article-title>. <source>Auton. Robots</source> <volume>32</volume>, <fpage>433</fpage>&#x02013;<lpage>454</lpage>.<pub-id pub-id-type="doi">10.1007/s10514-012-9287-y</pub-id></citation></ref>
<ref id="B45"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Kim</surname> <given-names>J.</given-names></name> <name><surname>Banks</surname> <given-names>C. J.</given-names></name> <name><surname>Shah</surname> <given-names>J. A.</given-names></name></person-group> (<year>2017</year>). &#x0201C;<article-title>Collaborative planning with encoding of users&#x02019; high-level strategies</article-title>,&#x0201D; in <conf-name>AAAI Conference on Artificial Intelligence (AAAI-17)</conf-name>, <conf-loc>San Francisco, CA</conf-loc>.</citation></ref>
<ref id="B46"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Langolf</surname> <given-names>G. D.</given-names></name> <name><surname>Chaffin</surname> <given-names>D. B.</given-names></name> <name><surname>Foulke</surname> <given-names>J. A.</given-names></name></person-group> (<year>1976</year>). <article-title>An investigation of fitts? Law using a wide range of movement amplitudes</article-title>. <source>J. Mot. Behav.</source> <volume>8</volume>, <fpage>113</fpage>&#x02013;<lpage>128</lpage>.<pub-id pub-id-type="doi">10.1080/00222895.1976.10735061</pub-id></citation></ref>
<ref id="B47"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Lober</surname> <given-names>R.</given-names></name></person-group> (<year>2014</year>). <source>Stochastic Machine Learning Toolbox</source>. Available at: <uri xlink:href="https://github.com/rlober/smlt">https://github.com/rlober/smlt</uri></citation></ref>
<ref id="B48"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Lober</surname> <given-names>R.</given-names></name> <name><surname>Padois</surname> <given-names>V.</given-names></name> <name><surname>Sigaud</surname> <given-names>O.</given-names></name></person-group> (<year>2014</year>). &#x0201C;<article-title>Multiple task optimization using dynamical movement primitives for whole-body reactive control</article-title>,&#x0201D; in <conf-name>Humanoid Robots (Humanoids), 2014 14th IEEE-RAS International Conference on</conf-name> (<conf-loc>Madrid</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>193</fpage>&#x02013;<lpage>198</lpage>.</citation></ref>
<ref id="B49"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Maeda</surname> <given-names>G.</given-names></name> <name><surname>Ewerton</surname> <given-names>M.</given-names></name> <name><surname>Lioutikov</surname> <given-names>R.</given-names></name> <name><surname>Ben Amor</surname> <given-names>H.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name></person-group> (<year>2014</year>). &#x0201C;<article-title>Learning interaction for collaborative tasks with probabilistic movement primitives</article-title>,&#x0201D; in <conf-name>Humanoid Robots (Humanoids), 2014 14th IEEE-RAS International Conference on</conf-name> (<conf-loc>Madrid</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>527</fpage>&#x02013;<lpage>534</lpage>.</citation></ref>
<ref id="B50"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Maeda</surname> <given-names>G. J.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name> <name><surname>Ewerton</surname> <given-names>M.</given-names></name> <name><surname>Lioutikov</surname> <given-names>R.</given-names></name> <name><surname>Kroemer</surname> <given-names>O.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Probabilistic movement primitives for coordination of multiple human&#x02013;robot collaborative tasks</article-title>,&#x0201D; in <source>Autonomous Robots</source>, <fpage>1</fpage>&#x02013;<lpage>20</lpage>.</citation></ref>
<ref id="B51"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Meier</surname> <given-names>F.</given-names></name> <name><surname>Schaal</surname> <given-names>S.</given-names></name></person-group> (<year>2016</year>). <article-title>A probabilistic representation for dynamic movement primitives</article-title>. <source>CoRR</source>. abs/1612.05932. Available at: <uri xlink:href="http://arxiv.org/abs/1612.05932">http://arxiv.org/abs/1612.05932</uri></citation></ref>
<ref id="B52"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Micha</surname> <given-names>H.</given-names></name> <name><surname>Aude</surname> <given-names>B.</given-names></name></person-group> (<year>2008</year>). <article-title>Dynamical system modulation for robot learning via kinesthetic demonstrations</article-title>. <source>IEEE Trans. Robot.</source> <volume>24</volume>, <fpage>1463</fpage>&#x02013;<lpage>1467</lpage>.<pub-id pub-id-type="doi">10.1109/TRO.2008.2006703</pub-id></citation></ref>
<ref id="B53"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Nguyen</surname> <given-names>N. T.</given-names></name> <name><surname>Phung</surname> <given-names>D. Q.</given-names></name> <name><surname>Venkatesh</surname> <given-names>S.</given-names></name> <name><surname>Bui</surname> <given-names>H.</given-names></name></person-group> (<year>2005</year>). &#x0201C;<article-title>Learning and detecting activities from movement trajectories using the hierarchical hidden Markov model</article-title>,&#x0201D; in <conf-name>Computer Vision and Pattern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on</conf-name>, Vol. <volume>2</volume> (<conf-loc>San Diego, CA</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>955</fpage>&#x02013;<lpage>960</lpage>.</citation></ref>
<ref id="B54"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Palinko</surname> <given-names>O.</given-names></name> <name><surname>Sciutti</surname> <given-names>A.</given-names></name> <name><surname>Patan&#x000E9;</surname> <given-names>L.</given-names></name> <name><surname>Rea</surname> <given-names>F.</given-names></name> <name><surname>Nori</surname> <given-names>F.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2014</year>). &#x0201C;<article-title>Communicative lifting actions in human-humanoid interaction</article-title>,&#x0201D; in <conf-name>Humanoid Robots (Humanoids), 2014 14th IEEE-RAS International Conference on</conf-name> (<conf-loc>Madrid</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>1116</fpage>&#x02013;<lpage>1121</lpage>.</citation></ref>
<ref id="B55"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Paraschos</surname> <given-names>A.</given-names></name> <name><surname>Daniel</surname> <given-names>C.</given-names></name> <name><surname>Peters</surname> <given-names>J. R.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name></person-group> (<year>2013a</year>). &#x0201C;<article-title>Probabilistic movement primitives</article-title>,&#x0201D; in <source>Advances in Neural Information Processing Systems</source>, <publisher-loc>Stateline, NV</publisher-loc>, <fpage>2616</fpage>&#x02013;<lpage>2624</lpage>.</citation></ref>
<ref id="B56"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Paraschos</surname> <given-names>A.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2013b</year>). &#x0201C;<article-title>A probabilistic approach to robot trajectory generation</article-title>,&#x0201D; in <conf-name>Humanoid Robots (Humanoids), 2013 13th IEEE-RAS International Conference on</conf-name> (<conf-loc>Atlanta, GA</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>477</fpage>&#x02013;<lpage>483</lpage>.</citation></ref>
<ref id="B57"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Paraschos</surname> <given-names>A.</given-names></name> <name><surname>Rueckert</surname> <given-names>E.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name> <name><surname>Neumann</surname> <given-names>G.</given-names></name></person-group> (<year>2015</year>). &#x0201C;<article-title>Model-free probabilistic movement primitives for physical interaction</article-title>,&#x0201D; in <conf-name>Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on</conf-name> (<conf-loc>Hamburg</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>2860</fpage>&#x02013;<lpage>2866</lpage>.</citation></ref>
<ref id="B58"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Pattacini</surname> <given-names>U.</given-names></name> <name><surname>Nori</surname> <given-names>F.</given-names></name> <name><surname>Natale</surname> <given-names>L.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2010</year>). &#x0201C;<article-title>An experimental evaluation of a novel minimum-jerk cartesian controller for humanoid robots</article-title>,&#x0201D; in <conf-name>Intelligent Robots and Systems (IROS), 2010 IEEE/RSJ International Conference on</conf-name> (<conf-loc>Taipei</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>1668</fpage>&#x02013;<lpage>1674</lpage>.</citation></ref>
<ref id="B59"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Peters</surname> <given-names>J.</given-names></name> <name><surname>Lee</surname> <given-names>D. D.</given-names></name> <name><surname>Kober</surname> <given-names>J.</given-names></name> <name><surname>Nguyen-Tuong</surname> <given-names>D.</given-names></name> <name><surname>Bagnell</surname> <given-names>J. A.</given-names></name> <name><surname>Schaal</surname> <given-names>S.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Robot learning</article-title>,&#x0201D; in <source>Springer Handbook of Robotics</source>, <fpage>357</fpage>&#x02013;<lpage>398</lpage>.</citation></ref>
<ref id="B60"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Ren</surname> <given-names>H.</given-names></name> <name><surname>Xu</surname> <given-names>G.</given-names></name></person-group> (<year>2002</year>). &#x0201C;<article-title>Human action recognition with primitive-based coupled-HMM</article-title>,&#x0201D; in <conf-name>Pattern Recognition, 2002. Proceedings. 16th International Conference on</conf-name>, Vol. <volume>2</volume> (<conf-loc>Quebec</conf-loc>: <conf-sponsor>IEEE</conf-sponsor>), <fpage>494</fpage>&#x02013;<lpage>498</lpage>.</citation></ref>
<ref id="B61"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Rozo Casta&#x000F1;eda</surname> <given-names>L.</given-names></name> <name><surname>Calinon</surname> <given-names>S.</given-names></name> <name><surname>Caldwell</surname> <given-names>D.</given-names></name> <name><surname>Jimenez Schlegl</surname> <given-names>P.</given-names></name> <name><surname>Torras</surname> <given-names>C.</given-names></name></person-group> (<year>2013</year>). &#x0201C;<article-title>Learning collaborative impedance-based robot behaviors</article-title>,&#x0201D; in <conf-name>Proceedings of the Twenty-Seventh AAAI Conference on Artificial Intelligence</conf-name>, <fpage>1422</fpage>&#x02013;<lpage>1428</lpage>.</citation></ref>
<ref id="B62"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sahin</surname> <given-names>E.</given-names></name> <name><surname>&#x000C7;akmak</surname> <given-names>M.</given-names></name> <name><surname>Dogar</surname> <given-names>M. R.</given-names></name> <name><surname>Ugur</surname> <given-names>E.</given-names></name> <name><surname>&#x000DC;&#x000E7;oluk</surname> <given-names>G.</given-names></name></person-group> (<year>2007</year>). <article-title>To afford or not to afford: a new formalization of affordances toward affordance-based robot control</article-title>. <source>Adapt. Behav.</source> <volume>15</volume>, <fpage>447</fpage>&#x02013;<lpage>472</lpage>.<pub-id pub-id-type="doi">10.1177/1059712307084689</pub-id></citation></ref>
<ref id="B63"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Sato</surname> <given-names>T.</given-names></name> <name><surname>Nishida</surname> <given-names>Y.</given-names></name> <name><surname>Ichikawa</surname> <given-names>J.</given-names></name> <name><surname>Hatamura</surname> <given-names>Y.</given-names></name> <name><surname>Mizoguchi</surname> <given-names>H.</given-names></name></person-group> (<year>1994</year>). &#x0201C;<article-title>Active understanding of human intention by a robot through monitoring of human behavior</article-title>,&#x0201D; in <conf-name>Proceedings of the IEEE/RSJ/GI International Conference on Intelligent Robots and Systems</conf-name>, Vol. <volume>1</volume>, <conf-loc>Munich</conf-loc>, <fpage>405</fpage>&#x02013;<lpage>414</lpage>.</citation></ref>
<ref id="B64"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Schaal</surname> <given-names>S.</given-names></name></person-group> (<year>2006</year>). &#x0201C;<article-title>Dynamic movement primitives: a framework for motor control in humans and humanoid robotics</article-title>,&#x0201D; in <source>Adaptive Motion of Animals and Machines</source> <publisher-name>Springer</publisher-name>, <fpage>261</fpage>&#x02013;<lpage>280</lpage>.</citation></ref>
<ref id="B65"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sciutti</surname> <given-names>A.</given-names></name> <name><surname>Bisio</surname> <given-names>A.</given-names></name> <name><surname>Nori</surname> <given-names>F.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2013</year>). <article-title>Robots can be perceived as goal-oriented agents</article-title>. <source>Interact. Stud.</source> <volume>14</volume>, <fpage>329</fpage>&#x02013;<lpage>350</lpage>.<pub-id pub-id-type="doi">10.1075/is.14.3.02sci</pub-id></citation></ref>
<ref id="B66"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Shah</surname> <given-names>J.</given-names></name> <name><surname>Wiken</surname> <given-names>J.</given-names></name> <name><surname>Williams</surname> <given-names>B.</given-names></name> <name><surname>Breazeal</surname> <given-names>C.</given-names></name></person-group> (<year>2011</year>). &#x0201C;<article-title>Improved human-robot team performance using chaski, a human-inspired plan execution system</article-title>,&#x0201D; in <conf-name>Proceedings of the 6th International Conference on Human-Robot Interaction</conf-name> (<conf-loc>Lausanne</conf-loc>: <conf-sponsor>ACM</conf-sponsor>), <fpage>29</fpage>&#x02013;<lpage>36</lpage>.</citation></ref>
<ref id="B67"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Silva</surname> <given-names>D. F.</given-names></name> <name><surname>Batista</surname> <given-names>G. E.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Speeding up all-pairwise dynamic time warping matrix calculation</article-title>,&#x0201D; in <conf-name>Proceedings of the 2016 SIAM International Conference on Data Mining</conf-name> (<conf-loc>Miami, FL</conf-loc>: <conf-sponsor>SIAM</conf-sponsor>), <fpage>837</fpage>&#x02013;<lpage>845</lpage>.</citation></ref>
<ref id="B68"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Soechting</surname> <given-names>J.</given-names></name></person-group> (<year>1984</year>). <article-title>Effect of target size on spatial and temporal characteristics of a pointing movement in man</article-title>. <source>Exp. Brain Res.</source> <volume>54</volume>, <fpage>121</fpage>&#x02013;<lpage>132</lpage>.<pub-id pub-id-type="doi">10.1007/BF00235824</pub-id><pub-id pub-id-type="pmid">6698142</pub-id></citation></ref>
<ref id="B69"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Soh</surname> <given-names>H.</given-names></name> <name><surname>Demiris</surname> <given-names>Y.</given-names></name></person-group> (<year>2015</year>). <article-title>Learning assistance by demonstration: smart mobility with shared control and paired haptic controllers</article-title>. <source>J. Hum. Robot Interact.</source> <volume>4</volume>, <fpage>76</fpage>&#x02013;<lpage>100</lpage>.<pub-id pub-id-type="doi">10.5898/JHRI.4.3.Soh</pub-id></citation></ref>
<ref id="B70"><citation citation-type="web"><person-group person-group-type="author"><name><surname>Stulp</surname> <given-names>F.</given-names></name></person-group> (<year>2014</year>). <source>DmpBbo &#x02013; a c&#x0002B;&#x0002B; Library for Black-Box Optimization of Dynamical Movement Primitives</source>. Available at: <uri xlink:href="https://github.com/stulp/dmpbbo">https://github.com/stulp/dmpbbo</uri></citation></ref>
<ref id="B71"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Stulp</surname> <given-names>F.</given-names></name> <name><surname>Raiola</surname> <given-names>G.</given-names></name> <name><surname>Hoarau</surname> <given-names>A.</given-names></name> <name><surname>Ivaldi</surname> <given-names>S.</given-names></name> <name><surname>Sigaud</surname> <given-names>O.</given-names></name></person-group> (<year>2013</year>). &#x0201C;<article-title>Learning compact parameterized skills with a single regression</article-title>,&#x0201D; in <conf-name>Proc. IEEE-RAS International Conference on Humanoid RObots &#x02013; HUMANOIDS</conf-name>, <conf-loc>Atlanta, GA</conf-loc>, <fpage>1</fpage>&#x02013;<lpage>7</lpage>.</citation></ref>
<ref id="B72"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Thill</surname> <given-names>S.</given-names></name> <name><surname>Ziemke</surname> <given-names>T.</given-names></name></person-group> (<year>2017</year>). &#x0201C;<article-title>The role of intention in human-robot interaction</article-title>,&#x0201D; in <conf-name>Proceedings of the Companion of the 2017 ACM/IEEE International Conference on Human-Robot Interaction, HRI &#x02019;17</conf-name> (<conf-loc>New York, NY, USA</conf-loc>: <conf-sponsor>ACM</conf-sponsor>), <fpage>427</fpage>&#x02013;<lpage>428</lpage>.</citation></ref>
<ref id="B73"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>J. M.</given-names></name> <name><surname>Fleet</surname> <given-names>D. J.</given-names></name> <name><surname>Hertzmann</surname> <given-names>A.</given-names></name></person-group> (<year>2005</year>). &#x0201C;<article-title>Gaussian process dynamical models</article-title>,&#x0201D; in <source>NIPS</source>, Vol. <volume>18</volume>, <publisher-loc>Vancouver</publisher-loc>, <fpage>3</fpage>.</citation></ref>
<ref id="B74"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>Z.</given-names></name> <name><surname>Deisenroth</surname> <given-names>M. P.</given-names></name> <name><surname>Amor</surname> <given-names>H. B.</given-names></name> <name><surname>Vogt</surname> <given-names>D.</given-names></name> <name><surname>Sch&#x000F6;lkopf</surname> <given-names>B.</given-names></name> <name><surname>Peters</surname> <given-names>J.</given-names></name></person-group> (<year>2012</year>). &#x0201C;<article-title>Probabilistic modeling of human movements for intention inference</article-title>,&#x0201D; in <source>Robotics: Science and Systems</source> (<publisher-loc>Sydney, NSW</publisher-loc>: <publisher-name>Citeseer</publisher-name>).</citation></ref>
<ref id="B75"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>Z.</given-names></name> <name><surname>M&#x000FC;lling</surname> <given-names>K.</given-names></name> <name><surname>Deisenroth</surname> <given-names>M. P.</given-names></name> <name><surname>Amor</surname> <given-names>H. B.</given-names></name> <name><surname>Vogt</surname> <given-names>D.</given-names></name> <name><surname>Sch&#x000F6;lkopf</surname> <given-names>B.</given-names></name> <etal/></person-group> (<year>2013</year>). <article-title>Probabilistic movement modeling for intention inference in human-robot interaction</article-title>. <source>Int. J. Robot. Res.</source> <volume>32</volume>, <fpage>841</fpage>&#x02013;<lpage>858</lpage>.<pub-id pub-id-type="doi">10.1177/0278364913478447</pub-id></citation></ref>
<ref id="B76"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Zube</surname> <given-names>A.</given-names></name> <name><surname>Hofmann</surname> <given-names>J.</given-names></name> <name><surname>Frese</surname> <given-names>C.</given-names></name></person-group> (<year>2016</year>). &#x0201C;<article-title>Model predictive contact control for human-robot interaction</article-title>,&#x0201D; in <conf-name>Proceedings of ISR 2016: 47st International Symposium on Robotics</conf-name>, <conf-loc>Munich</conf-loc>, <fpage>1</fpage>&#x02013;<lpage>7</lpage>.</citation></ref>
</ref-list>
<fn-group>
<fn id="fn1"><p><sup>1</sup>Currently, this scenario is frequently addressed in manufacturing by robots and lifters; in the future, we imagine that humanoid robots could also be used for such task, for assisting workers in environments where robots cannot be installed on a fixed base, such as in some aircraft manufacturing operations (Caron and Kheddar, <xref ref-type="bibr" rid="B14">2016</xref>).</p></fn>
<fn id="fn2"><p><sup>2</sup>There may be applications where converging to a unique and precise goal could be a desirable property of the robot&#x02019;s movement. However, it is an assumption that prevents us to generalize the method for different actions, and this is another reason why we prefer ProMPs.</p></fn>
<fn id="fn3"><p><sup>3</sup>We refer the interested reader to Maeda et al. (<xref ref-type="bibr" rid="B49">2014</xref>) for a thorough comparison between DMPs and ProMPs to be used for interaction primitives and prediction.</p></fn>
<fn id="fn4"><p><sup>4</sup>To avoid disambiguation, in our method, tasks are encoded by primitives that are made of trajectories: this is a very classical approach for robot learning techniques and in general techniques based on primitives. Of course this is a simplification, but it allows representing a number of different tasks: pointing, reaching, grasping, gazing, etc.</p></fn>
<fn id="fn5"><p><sup>5</sup>In this article, we denote by <italic>early observations</italic> the first portion of a movement observed by the robot, i.e., from <italic>t</italic>&#x02009;&#x0003D;&#x02009;0 to acurrent <italic>t</italic>.</p></fn>
<fn id="fn6"><p><sup>6</sup>The Geomagic Touch is a haptic device, capable of providing force feedback from the simulation to the operator. In our experiments with the simulated iCub, we did not use this feature. We used the Geomagic Touch to steer the arm of the simulated robot. In that sense, we used it more as a joystick for moving the left arm.</p></fn>
<fn id="fn7"><p><sup>7</sup>In some tasks, <italic>e.g.</italic>, reaching, it is reasonable to assume that the difference of duration of the demonstrated trajectories is negligible; however, in other tasks, the duration of the demonstrated trajectories may vary significantly.</p></fn>
<fn id="fn8"><p><sup>8</sup>That is, we computed the <italic>p</italic>(<bold><italic>&#x003C9;</italic></bold>) distribution from the dataset <inline-formula><mml:math id="M168"><mml:mrow><mml:mo class="MathClass-open">&#x0007B;</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:msub><mml:mrow><mml:mtext>&#x02009;</mml:mtext></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">&#x0007D;</mml:mo></mml:mrow></mml:math></inline-formula>, where each <bold><italic>&#x003C9;</italic></bold><italic><sub>i</sub></italic> is an estimated parameter computed from the trajectory demonstrations.</p></fn>
<fn id="fn9"><p><sup>9</sup>Actually, we call here duration what is in fact the total number of samples for the trajectory.</p></fn>
<fn id="fn10"><p><sup>10</sup>In our case, this assumption can be appropriate, because the reaching trajectories in our application are generally monotonic increasing/decreasing.</p></fn>
<fn id="fn11"><p><sup>11</sup>In this model, we assume that we can find the time modulation parameter according to the global variation of the position during the <italic>n<sub>o</sub></italic> first observed data.</p></fn>
<fn id="fn12"><p><sup>12</sup>Note that in that particular example we do not use the orientation because we want the robot&#x02019;s hand to keep the same orientation during the movement. But in principle, it is possible to learn trajectories consisting of the 6D/7D Cartesian position and orientation of the hand, to make the robot change also the orientation of the hand during the task.</p></fn>
<fn id="fn13"><p><sup>13</sup>In our example, we do not use the simulated wrench information as it is very noisy. However, we provide the code and show how to retrieve it and use it, in case the readers should not have access to the real iCub.</p></fn>
<fn id="fn14"><p><sup>14</sup>Note that in our example wrenches are separated from the Cartesian position, because they are not used to recognize the index of the current ProMP during the inference.</p></fn>
<fn id="fn15"><p><sup>15</sup>Information about this function can be found here: <uri xlink:href="https://fr.mathworks.com/help/signal/ref/envelope.html?requestedDomain&#x0003D;www.mathworks.com">https://fr.mathworks.com/help/signal/ref/envelope.html?requestedDomain&#x0003D;www.mathworks.com</uri>.</p></fn>
<fn id="fn16"><p><sup>16</sup><italic>n<sub>o</sub></italic> is not the same for each trajectory test, because it depends on the total duration of the trajectory to be inferred.</p></fn> 
<fn id="fn17"><p><sup>17</sup>Since the model uses the <italic>n<sub>o</sub></italic> parameter, its computation cannot be performed before this step.</p></fn>
<fn id="fn18"><p><sup>18</sup>In future versions, we will include the possibility to have different noise models for the observations, e.g., we will have <inline-formula><mml:math id="M169"><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mfenced separators="" open="[" close="]"><mml:mrow><mml:mtable equalrows="false" columnlines="none none none none none none none none none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>X</mml:mi></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="center"><mml:mn>0</mml:mn></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="center"><mml:mn>0</mml:mn></mml:mtd><mml:mtd class="array" columnalign="center"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></inline-formula>. We will therefore set a bigger covariance for the wrench information than for the position information.</p></fn>
<fn id="fn19"><p><sup>19</sup>From the book (Bishop, <xref ref-type="bibr" rid="B5">2006</xref>).</p></fn>
</fn-group>
<app-group>
<app id="A1">
<title>Appendix</title>
<sec id="S15">
<title>A. Detail of the Inference Formula</title>
<p>In this Appendix, we explain how to obtain the inference formulae used in our software. First, let us recall the Marginal and Conditional Gaussians laws.<xref ref-type="fn" rid="fn19"><sup>19</sup></xref> Given a marginal Gaussian distribution for <italic>x</italic> and a Gaussian distribution for <italic>y</italic> given <italic>x</italic> in the following form:
<disp-formula id="E29"><label>(A1)</label><mml:math id="M154"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>x</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mi>x</mml:mi><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mi>&#x003BC;</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mn>&#x00394;</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mi>x</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mtext mathvariant="italic">Ax</mml:mtext><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>b</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula>
the marginal distribution of <italic>y</italic> and the conditional distribution of <italic>x</italic> given <italic>y</italic> are given by the following equations:
<disp-formula id="E30"><label>(A2)</label><mml:math id="M155"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>y</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mi>y</mml:mi><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mi>A</mml:mi><mml:mi>&#x003BC;</mml:mi><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>b</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>A</mml:mi><mml:msup><mml:mrow><mml:mn>&#x00394;</mml:mn></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:msup><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E31"><label>(A3)</label><mml:math id="M156"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mi>y</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mi>x</mml:mi><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mo class="MathClass-op">&#x003A3;</mml:mo><mml:msup><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msup><mml:mi>L</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>b</mml:mi></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>&#x00394;</mml:mn><mml:mi>&#x003BC;</mml:mi><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
where
<disp-formula id="E32"><mml:math id="M157"><mml:mo class="MathClass-op">&#x003A3;</mml:mo><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>&#x00394;</mml:mn><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msup><mml:mrow><mml:mi>A</mml:mi></mml:mrow><mml:mrow><mml:mtext>T</mml:mtext></mml:mrow></mml:msup><mml:mtext mathvariant="italic">LA</mml:mtext></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>We computed the parameter&#x02019;s marginal Gaussian distribution from the set of observed movements:
<disp-formula id="E33"><label>(A4)</label><mml:math id="M158"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0223C;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo></mml:math></disp-formula></p>
<p>From the model <inline-formula><mml:math id="M159"><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003B5;</mml:mi></mml:mrow><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow></mml:msub></mml:math></inline-formula>, we have the conditional Gaussian distribution for &#x0039E; given <bold><italic>&#x003C9;</italic></bold>:
<disp-formula id="E34"><label>(A5)</label><mml:math id="M160"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>Then, using equation <xref ref-type="disp-formula" rid="E30">(A2)</xref> we have the following:
<disp-formula id="E35"><label>(A6)</label><mml:math id="M161"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo><mml:mn class="MathClass-rel">&#x0007C;</mml:mn><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced><mml:mspace width="0.3em" class="thinspace"/><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula>
that is the prior distribution of the ProMP.</p>
<p>Let <inline-formula><mml:math id="M162"><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula> be the first <italic>n<sub>o</sub></italic> observations of the trajectory to predict with the first <italic>n<sub>o</sub></italic> elements corresponding to the early observations.</p>
<p>Let <inline-formula><mml:math id="M163"><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:msup><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:mo class="MathClass-op">&#x02026;</mml:mo><mml:mo class="MathClass-punc">,</mml:mo><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:math></inline-formula> be the whole trajectory we have to predict. We can then compute the posterior distribution of the ProMP by using the conditional Gaussians equation <xref ref-type="disp-formula" rid="E31">(A3)</xref>:
<disp-formula id="E36"><label>(A7)</label><mml:math id="M164"><mml:mtable columnalign="left" class="align"><mml:mtr><mml:mtd columnalign="right" class="align-odd"><mml:mi>p</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=""><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>K</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mfenced separators="" open="" close=")"><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>K</mml:mi><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="E37"><label>(A8)</label><mml:math id="M165"><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.3em" class="nbsp" /><mml:mi>K</mml:mi><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="0.3em" class="thinspace"/><mml:msup><mml:mrow><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">.</mml:mo></mml:math></disp-formula></p>
<p>Thus, we have the posterior distribution of the ProMP <inline-formula><mml:math id="M166"><mml:mi>p</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo class="MathClass-open">(</mml:mo><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle><mml:mo class="MathClass-rel">&#x0007C;</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003BC;</mml:mi></mml:mstyle></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow></mml:msub><mml:mo class="MathClass-punc">,</mml:mo><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mstyle mathvariant="bold"><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mstyle></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>&#x003C9;</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">)</mml:mo></mml:mrow></mml:math></inline-formula> with:
<disp-formula id="E38"><label>(A9)</label><mml:math id="M167"><mml:mfenced separators="" open="{" close=""><mml:mrow><mml:mtable equalrows="false" columnlines="none" equalcolumns="false" class="array"><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msup><mml:mrow><mml:mo class="MathClass-op">&#x0039E;</mml:mo></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msup><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mi>&#x003BC;</mml:mi></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:msub><mml:mrow><mml:mover accent="true"><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mo class="MathClass-op">&#x0005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mi>K</mml:mi><mml:mspace width="0.3em" class="thinspace"/><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mtd></mml:mtr><mml:mtr><mml:mtd class="array" columnalign="left"><mml:mi>K</mml:mi></mml:mtd><mml:mtd class="array" columnalign="left"><mml:mo class="MathClass-rel">&#x0003D;</mml:mo><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="0.3em" class="thinspace"/><mml:msup><mml:mrow><mml:mfenced separators="" open="(" close=")"><mml:mrow><mml:msubsup><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mi>&#x003BE;</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msubsup><mml:mo class="MathClass-bin">&#x0002B;</mml:mo><mml:msub><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo class="MathClass-op">&#x003A3;</mml:mo></mml:mrow><mml:mrow><mml:mstyle mathvariant="bold-italic"><mml:mi>&#x003C9;</mml:mi></mml:mstyle></mml:mrow></mml:msub><mml:msubsup><mml:mrow><mml:mn>&#x003A6;</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo class="MathClass-open">[</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo class="MathClass-punc">:</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>o</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo class="MathClass-close">]</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mo class="MathClass-rel">&#x022A4;</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:mo class="MathClass-bin">&#x02212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo class="MathClass-punc">.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mfenced></mml:math></disp-formula></p>
</sec>
</app>
</app-group>
</back>
</article>