{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Si vous utilisez ipython 3.x, cette ligne ne sert à rien mais ne gêne pas !\n", "# Avec ipython 2.7, cette ligne est nécessaire pour la syntaxe 'fonction print'.\n", "from __future__ import print_function, division " ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from pypot.vrep import from_vrep\n", "from poppy.creatures import PoppyTorso" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Cette ligne crée un objet de type PoppyTorso et le connecte sur le simulateur V-Rep :\n", "poppy = PoppyTorso(simulator='vrep')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ,\n", " ]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Echo de la liste des moteurs:\n", "poppy.motors" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.r_shoulder_y.goto_position(-45,1,wait=False)\n", "poppy.r_shoulder_x.goto_position(-45,1,wait=False)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.head_y.goto_position(45,1,wait=False)\n", "poppy.l_shoulder_y.goto_position(-20,2,wait=False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.head_y.goto_position(-45,1,wait=False)\n", "poppy.l_shoulder_y.goto_position(-150,1,wait=False)\n", "poppy.l_shoulder_x.goto_position(30,1,wait=False)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.l_shoulder_y.goto_position(-45,1,wait=False)\n", "poppy.l_shoulder_x.goto_position(45,1,wait=False)" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [], "source": [ "poppy.bust_y.goto_position(-20,1,wait=False)\n", "poppy.abs_z.goto_position(20,1,wait=False)\n", "poppy.r_elbow_y.goto_position(25,1,wait=False)" ] }, { "cell_type": "code", "execution_count": 40, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 41, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.abs_z.goto_position(40,1,wait=False)\n", "poppy.r_shoulder_y.goto_position(20,1,wait=False)\n", "poppy.l_shoulder_y.goto_position(-30,1,wait=False)\n", "poppy.head_y.goto_position(30,1,wait=True)\n", "poppy.head_y.goto_position(-20,1,wait=True)\n", "poppy.head_z.goto_position(-20,1,wait=False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }