Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| pepper-imitation:pepper-imitation [2018/06/28 17:55] – created s4pepper2018 | pepper-imitation:pepper-imitation [2018/06/28 20:18] (current) – s4pepper2018 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Pepper | + | ====== |
| {{tag> | {{tag> | ||
| - | ===== Principe | + | ===== Summary |
| - | Cette approche étend les modèles à mélanges Gaussien aux variétés Riemanniennes où les données de rotation comme les quaternions sont naturellement représentées. Plus d' | + | The project aims to be the first steps for a development of a more general learn-by-imitation approach |
| - | * M J A Zeestraten, I Havoutis, J Silvério, S Calinon and D G Caldwell. An Approach | + | |
| - | Dans notre cas, la variété Riemannienne étudiée est la combinaison des espaces cartésiens (position) et Riemanniens (orientation) de chaque articulation du squelette humain formant l' | + | |
| - | * Maxime Devanne, Sao Mai Nguyen. Multi-level Motion Analysis | + | |
| - | ===== Code ===== | + | The main goal was to simulate a well-known nursery rhyme used by Ms Collot's team to interact with the patients. The song is divided up in several sections, where the entertainer would assume a pre-defined posture that the kids should try to imitate. |
| - | Le code suivant est en matlab. Une version python de l'extension des GMM sur les variétés Riemannienne peut être trouvée ici: https:// | + | |
| - | Il y a deux fichiers principaux, un pour l' | + | The gestures currently used are shown in the image below: |
| - | * 1. Apprentissage | + | {{: |
| - | Le script ' | + | |
| - | <code matlab> | + | |
| - | %% Parameters | + | |
| - | nbData = 300; %Number of datapoints | + | |
| - | nbSamples =2; %Number of demonstrations | + | |
| - | trainName={' | + | |
| - | nspp=2; %number of skeleton sequence per folder | + | |
| - | </ | + | As such, the project is built on top of two main pillars, namely: |
| - | //nbData// est le nombre de trames à laquelle chaque séquence sera échantillonnée. | + | * **Body pose detection**: |
| - | // | + | * **Robot control and synchronization**. |
| - | // | + | |
| - | //nspp// est le nombre de séquence de squelette à charger dans chaque dossier. Si la valeur est 2, les séquence 1 et 2 seront chargées depuis chaque dossier. | + | |
| + | Body pose detection was entirely done using publicly available software. Thus, the main focus of our work was to familiarize ourselves with the robot itself and synchronize all the tasks, as well as fine-tune everything, taking into account the nature of the project and the target subjects. | ||
| - | Tout d' | + | The chosen framework was ROS (the only tested version was kinetic), written mainly |
| - | <code matlab> | + | |
| - | %% Data processing | + | |
| - | trainName={' | + | |
| - | [model, | + | |
| - | % data projected on tangent spaces of the human pose space | + | |
| - | u = [uIn; uOut{1}.data; | + | |
| - | % original data x (positions 3D and quaternions) in the human pose space | + | |
| - | x = [xIn; xOut{1}.data; | + | |
| - | model.x=x; | + | |
| - | </ | + | |
| - | Les données de squelettes ont été capturées à l'aide de la [[sensors: | + | |
| - | De plus, pour segmenter la séquence en différent segments temporels correspondant à différents mouvements unitaires, et ainsi utiliser ces segments lors de l' | + | ===== Installation and Set Up ===== |
| - | Une fois les données chargées, | + | The code is fully available [[https://github.com/Thordreck/pepper-imitation-pkg|here]]. The repo should be cloned directly into the src folder of a catkin workspace. |
| + | The repository above contains two ROS packages at the root folder level: | ||
| + | * **openni_tracker**: | ||
| + | * **pepper_imitation**: | ||
| - | <code matlab> | + | Dependencies |
| - | %% GMM learning | + | |
| - | [ model ] = learnGMMmodel(model, | + | |
| - | save(' | + | |
| - | </ | + | |
| - | Le modèle GMM est appris à partir des données d' | + | |
| - | Le modèle appris est ensuite sauvegardé. | + | |
| - | * 2. Evaluation | + | ===== Running the game ===== |
| - | Le script ' | + | |
| - | La première étape est de charger les données (modèle appris, une séquence d' | + | The game sequence can be started by running the roslaunch file pepper_imitation_game.launch. |
| - | <code matlab> | + | The skeleton tracker and the kinect driver are to be run separately using the file pepper_imitation_kinect.launch. |
| - | %% load data | + | |
| - | % model | + | Body pose checks can be disabled in pepper_imitation_node.launch, |
| - | load modelExo3 | + | |
| - | % data train for temporal alignment | + | ===== Architecture ===== |
| - | dirTrain=' | + | |
| - | fnameTrain=' | + | |
| - | [oriMatTrain, | + | |
| - | % data test | + | The system is made up of the following nodes: |
| - | dirTest='data/ | + | * **pepper_audio_player_node**: |
| - | fnameTest='SkeletonSequence3.txt'; | + | * **pepper_face_tracker_node**: |
| - | [oriMatTest_, | + | * **pepper_tts_node**: |
| - | dataTest{1}=dataTest_; | + | * **pepper_tablet_node**: |
| - | </ | + | * **pepper_imitation_node**: |
| + | * **pepper_teleop_joy_node**: | ||
| - | Ensuite la séquence peut être évaluée: | + | All these nodes can be run separately and commanded by publishing in their respective topics, allowing a Wizard of Oz-ish level of control. |
| - | <code matlab> | + | The actual game and synchronization is achieved by means of a state machine, defined in " |
| - | %% Evaluate sequence | + | |
| - | for rep=1: | + | |
| - | % temporal alignment | + | |
| - | if registration==1 | + | |
| - | [dataTestAligned,r, | + | |
| - | | + | |
| - | else | + | |
| - | dataTestAligned=dataTest{rep}; | + | |
| - | end | + | |
| - | % compute likelihoods | + | ===== Game Flow ===== |
| - | [Lglobal, | + | |
| - | % get scores | + | The expected behaviour is as follows: |
| - | | + | * Pepper says hi, welcome the users to IMT Atlantique, and invites them to click on the tablet to enter a name. |
| - | [Sglobal,Sbodypart,Sjoints] = computeScores(model,Lglobal,Lbodypart,Ljoints, | + | * When the user clicks, an input dialog will appear after a few seconds. |
| - | | + | * After entering his name, the music starts playing and the game goes into its main loop. |
| - | | + | * Pepper prompts the user to do as him, and assumes a given pose sync'd with the music. |
| - | | + | * Now, two possible scenarios can follow: |
| - | % For each score, the first value corresponds | + | * The player adopts a pose similar enough. Then Pepper will encourage him to keep going, and the song continues. |
| - | % whole sequence, | + | * The player does not make a similar pose, or the body pose is not detected properly. In this case, Pepper will ask the player to focus and try again, and the music will go back to the previous part. |
| - | end | + | * If no skeleton at all is found, Pepper will tell the user that it cannot find him. Two more additional sub-scenarios are possible here: |
| - | </code> | + | * The user is detected again after a while. Pepper informs the player and the game continues. |
| - | Le score pour chaque partie du corps se trouve dans //scoreLA//, //scoreRA// et // | + | * If no skeleton is found after a while the game is stopped. |
| + | * When all the gestures are done and the music ends, Pepper thanks | ||
| + | |||
| + | ===== Known Issues | ||
| + | |||
| + | * The synchronization process is hardcoded. As such, correct synchronization will only be achieved if the same file is used (it is available in the robot' | ||
| + | * The way openni_tracker publish the skeleton information (using TF frames following the convention < | ||
| + | * As of now, only one person is tracked. However, adding multiple person' | ||
| + | |||
| + | ===== Future Work ===== | ||
| + | |||
| + | * The detection provided by the kinect and the openni libraries is not enough. The calibration phase is a limiting factor when interacting with the subjects. A possible solution to this would be to adopt body pose detection based on RGB data alone. An example of this would be [[https://github.com/CMU-Perceptual-Computing-Lab/openpose|OpenPose]]. This particular game could be reproduced entirely using only joints angles data in 2D detections, even allowing us to get rid of the external kinect completely, and using the built-in cameras. More complex scenarios and gestures may need visual and depth data fusion. For a real time application, | ||
| + | * The concept of this game can be generalized a bit, using some simple config files. These files could define the audio file to be used and the time when each posture should be adopted. Postures may be defined here as well. | ||
| + | * Furthermore, | ||
| + | |||
| + | ===== Contact ===== | ||
| + | |||
| + | Álvaro Páez Guerra | ||
| + | |||
| + | paezguerraalvaro@gmail.com | ||