{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "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": [ "poppy = PoppyTorso(simulator='vrep')" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "{'abs_z': 0.0,\n", " 'bust_x': 0.0,\n", " 'bust_y': 0.29999999999999999,\n", " 'head_y': -3.1000000000000014,\n", " 'head_z': 0.0,\n", " 'l_arm_z': -0.0,\n", " 'l_elbow_y': 0.0,\n", " 'l_shoulder_x': -2.2999999999999972,\n", " 'l_shoulder_y': 0.0,\n", " 'r_arm_z': -0.0,\n", " 'r_elbow_y': 0.0,\n", " 'r_shoulder_x': 0.0,\n", " 'r_shoulder_y': 1.4000000000000057}" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "{m.name: m.present_position for m in poppy.motors}" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.reset_simulation()" ] }, { "cell_type": "code", "execution_count": 57, "metadata": { "collapsed": true }, "outputs": [], "source": [ "poppy.l_shoulder_x.goto_position(100, 2, wait= False)\n", "poppy.r_shoulder_x.goto_position(-80, 2, wait= False)\n", "poppy.l_elbow_y.goto_position(90, 2)\n", "poppy.r_elbow_y.goto_position(-60, 2)\n", "poppy.bust_x.goto_position(20, 2)\n", "poppy.head_z.goto_position(75, 2, wait=False)\n", "poppy.head_y.goto_position(-30, 2, wait=True)" ] } ], "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.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }