====== Poppy robot ======
{{tag>robot Poppy}}
[[http://poppy-project.org|Poppy robot]] is a humanoid robot that can be used with its hardware platform or with a [[poppy#simulator|simulator]]. It can be programmed with python, using the [[poppy#Set-up the software|pypot library]], or it can also have a web interface with snap.
====== Quick links ======
* A start-up tutorial:
* getting started with Poppy https://forum.poppy-project.org/t/getting-started-with-poppy-project/362
* the official doc : https://github.com/poppy-project/poppy-humanoid/blob/master/doc/en/getting_started.md
* a good step to step tutorial: https://github.com/HumaRobotics/poppy-examples/tree/master/doc
* and tutorials on their forum: https://forum.poppy-project.org/tags/tutorial
* other official website (to see other institutions using Poppy) : https://www.poppystation.org
* For any questions : https://forum.poppy-project.org/
* Install:
- Install pypot : http://poppy-project.github.io/pypot/intro.html#installation
- Install software for poppy : https://github.com/poppy-project/poppy-torso
* Example programs:
- Move and replay movements: http://poppy-project.github.io/pypot/move.html
===== Our robots =====
We currently have 2 Poppy robots:
* a [[https://github.com/poppy-project/poppy-torso|Poppy-torso]] : this Poppy is already assembled, except for the inside of the head. This Poppy-torso can be used with 2 legs or a [[https://forum.poppy-project.org/t/new-creature-in-progress-poppy-torso/991|suction pad with lever arm]] to stick the robot to a flat surface. We still need to setup the camera and microphone and the embedded computer inside the head and assemble the suction pad.
* a [[https://github.com/poppy-project/poppy-humanoid/blob/master/doc/en/getting_started.md|Poppy-humanoid]]: a full-body humanoid with the legs. All the parts are nearly assembled. We still need to setup the camera and microphone and the embedded computer inside the head. From February 2017, the Poppy humanoid has been upgraded to its new version. The novelties are:
* 3D parts below the hip motors to increase amplitude of legs motion.
* Modified wrists with to new motors XL-320 for each. Now, Poppy can move the hands.
* A speaker is now integrated in the head. It allows Poppy to speak.
* A screen is also integrated in the head to display eyes of Poppy.
* The Odroid XU 4 has been replaced by a Rasberry Pi 3.
We have 2 embedded Odroid processors for our Poppy robot:
* an [[:odroid_xu_4]]
* an [[:odroid_3]]
===== Set-up your Poppy =====
{{:motor_naming_convention.jpg}} {{:poignetsids_.png}}
==== Set up the hardware ====
{{tag>hardware}}
* getting your material: the list of material https://github.com/poppy-project/Poppy-lightweight-biped-legs/blob/master/doc/BOM.md or https://docs.google.com/spreadsheets/d/1JTgnleBYUdU6cn87NjxFi2tbDfmRrJWdX2hGNNN6CUY/edit#gid=1
* Assembly instructions: https://github.com/poppy-project/poppy-humanoid/blob/master/hardware/doc/Poppy_Humanoid_assembly_instructions.md
* For the new version of Poppy, here are assembly instructions for the wrists [{{:installation_poignets.pdf|}}] and the head [{{:installation_tete.pdf|}}] .
* You would need to install software to setup the motors. The best would be the dynamixel wizard on windows.
* On windows, install [[http://support.robotis.com/en/software/roboplus/dynamixel_monitor/quickstart/dynamixel_monitor_connection.htm|Dynamixel wizard]] through [[http://www.robotis.com/xe/download_en/1132559|roboplus software]].
* On a macos, you would need to install herborist which needs PyQt. Guides for macos can be read here http://www.pythonschool.net/pyqt/installing-pyqt-on-mac-os-x/ and http://www.noktec.be/python/how-to-install-pyqt4-on-osx.
==== Set-up the software ====
{{tag>software}}
Poppy uses pypot for control. It is a python library : http://poppy-project.github.io/pypot/index.html
On the top of pypot are libraries for Poppy creatures : https://github.com/poppy-project
The quick install consists in:
* install pypot : sudo pip install pypot
* install your popppy creature. For instance for poppy humanoid : sudo pip install poppy_humanoid
* to check that the libraries are installed correctly, execute with python the code:
from poppy_humanoid import PoppyHumanoid
poppy = PoppyHumanoid()
A good guide can be found here: https://github.com/HumaRobotics/poppy-examples/blob/master/doc/softwareGuide/softwareGuide.pdf. More technical details for your first start of Poppy, after [[http://poppy-project.github.io/pypot/intro.html#installation|installation of pypot]], you can also look into [[:poppy_software]]
===== Simulator =====
{{tag>software}}
A poppy simulator is available with vrep simulator.
[[https://forum.poppy-project.org/t/howto-connect-pypot-to-your-simulated-version-of-a-poppy-humanoid-in-v-rep/332|the installation]] and the [[https://github.com/poppy-project/poppy-humanoid/blob/master/software/samples/notebooks/Controlling%20a%20Poppy%20humanoid%20in%20V-REP%20using%20pypot.ipynb|control part]].
++++ In details, this is what I did |
- Downloaded [[http://www.coppeliarobotics.com/downloads.html|vrep simulator ]]
- Downloaded the software git clone https://github.com/poppy-project/poppy-humanoid.git
- in software folder, run sudo python setup.py install
- To check if everything is installed correctly, you can run the following code. If it runs without raising an error, everything is probably installed correctly: from pypot.vrep import from_vrep
from poppy.creatures import PoppyHumanoid
- To instantiate poppy in vrep
- Open vrep
- run the following code in python:
from poppy.creatures import PoppyHumanoid
poppy = PoppyHumanoid(simulator='vrep')
- check the communication is fine with the following code:
poppy.motors
poppy.l_shoulder_y
poppy.head_y.present_position
[m.present_position for m in poppy.motors]
Test the installation :
- To test that you can control poppy (its head):
poppy.reset_simulation()
poppy.head_z.goto_position(-45, 2)
- Now let's make the robot's head move.
- In python run the control code:
import time
import math
current, goal = [], []
amp=60
freq=0.5
t0 = time.time()
while True:
t = time.time()
# run for 5s
if t - t0 > 50:
break
poppy.head_z.goal_position = amp * math.sin(2 * 3.14 * freq * t)
current.append(poppy.head_z.present_position)
goal.append(poppy.head_z.goal_position)
time.sleep(0.04)
- then plot the goal and actual positions:
import numpy
from matplotlib import pyplot
t = numpy.linspace(0, 5, len(current))
pyplot.plot(t, goal)
pyplot.plot(t, current)
pyplot.legend(('goal', 'current'))
pyplot.show()
++++
===== Our configuration =====
{{tag>software}}
The configuration file used for the robots are available here {{:poppy-config.zip|}}.
The main differences with the original configuration are:
* The offsets have been adapted to our robot
* The angle limits have been adapted to our robot
(note: the head is not working when using all other joints)
If you want to change the configuration of Poppy, here are a few explanations about the trickiest parts:
* The angle limits are absolute and __**do not**__ depend on the offset or orientation (therefore, if you want to set them using pypot, make sure to initially set the orientation to direct and the offset to zero)
* The offset __**does**__ depend on the orientation (if you need to set it using pypot, I recommend you to initially set it to zero and set the orientation you chose)
* The orientation will only change the sense of rotation of the motor (be cautious when you switch it as you will have to change the offset to its opposite if you want to keep the same initial pose)
NB: The angle_limit that appears when you look at the corresponding value of a pypot Motor (for example ergo.l_elbow_y.angle_limit) are relative to the offset and orientation.
**With the new version of the robot from february 2017, our customized configuration is no more valide and the configuration from pypot (PoppyHumanoid) can be used.**
===== Programming with the visual programming language Snap! =====
{{tag>software}}
http://nbviewer.ipython.org/github/poppy-project/pypot/blob/master/samples/notebooks/Controlling%20a%20Poppy%20Creature%20using%20SNAP.ipynb
Commands to use Poppy on the simulator vrep and program it with Snap!
| |Poppy-Torso with snap |Poppy Humanoid with snap |
|1st way: terminal command | poppy-services --vrep --snap poppy-torso
| poppy-services --vrep --snap poppy-humanoid
|
|2nd way : python command | from poppy.creatures import PoppyTorso;
poppy = PoppyTorso(simulator='vrep', use_snap=True) ;
poppy.snap.run();
| from poppy.creatures import PoppyHumanoid;
poppy = PoppyHumanoid(simulator='vrep', use_snap=True);
poppy.snap.run();
|
All articles on Poppy:
{{topic>poppy}}