First start of Poppy

After you finished the assembly of Poppy, you should take care to the first start.

Step 1: Power Supply

Plug the alimentation, the led of each motor should blink one time in red. This means that the power supply of the motor is OK.

Step 2: Communication

Open a ipython console and check if each motor is detected.

import pypot.dynamixel
dxl_io_upper = pypot.dynamixel.DxlIO('PORT_UPPER_BODY')
dxl_io_lower =  pypot.dynamixel.DxlIO('PORT_LOWER_BODY')
print dxl_io_upper.scan(range(60))
print dxl_io_lower.scan(range(30))

the result should be: [31, 32, 33, 34, 35, 36, 37, 41, 42, 43, 44, 51, 52, 53, 54] and [11, 12, 13, 14, 15, 21, 22, 23, 24, 25]

Step 3: Generate the Poppy configuration file

Then have just to run the script after replacing your COM port:

poppy_config['controllers']['lower_body_controller']['port'] = "PORT_LOWER_BODY"
poppy_config['controllers']['upper_body_controller']['port'] = "PORT_UPPER_BODY"
cd path/to/poppy-software
cd poppytools/configuration

It will generate a .json file with the configuration of the whole robot.
Now you can create the poppy robot like this:

import pypot.robot
from poppytools.configuration.config import poppy_config

poppy = pypot.robot.from_config(poppy_config)

Step 4: Make it move

Now it is time to make it move. The first thing to do, is to order each motor to go to the position 0°. At this stage, you will able to know if you have correctly assembled Poppy :slight_smile:

import time

import pypot.robot
from poppytools.configuration.config import poppy_config

poppy = pypot.robot.from_config(poppy_config)

for m in poppy.motors:
    m.compliant = False

for m in poppy.motors:
    m.goto_position(0, 5)


The robot should slowly take this posture:

If it doesn’t, this means that one or several motors were not correctly assembled/aligned.

Step 5: Your Poppy is ready

If you manage to have your Poppy correctly positioned when you each motor in 0° position, your Poppy is ready to be used :slight_smile:

1 Like

Bonjour, avez-vous déjà rencontré ce type de problème ?

J’ai installé poppy-software en exécutant le depuis l’archive décompressée dans mes documents, c’est sans doute cela qui a créé un dossier.egg dans mon répertoire usr/local/lib/python2.7/dist-packages
J’ai édité et executé le fichier depuis le répertoire unzippé dans mes documents et non pas depuis dist-packages/poppytools-0.2-py2.7.egg, ce dernier ne semble pas accessible avec python depuis la console.
Je n’arrive pas à voir d’ou vient le problème…

you will find the usr folder in “File Systems”.
with “sudo nautilus” in the terminal you can follow the error-link and add the poppy_config.json file.

Thank you for your answer but I can’t paste the file in the archive.egg (I try to righ-click paste but the option isn’t available)

You use Linux?
Did you try it with the “sudo nautilus” order in the terminal? With that order you open a new window and you have all the rights to change the folder

Yes i tried that but the paste option on right click was still in gray…

here i can click on the gray paste or you use “ctrl + v”

You can do it into an .egg archive ? even into my sudo nautilus session (i think it’s the python package installation directory created with the of poppy-software) i can’t copy then paste the .json file…
Ctrl+V hasn’t worked for me…

Finally what I should know in priority is how to use the poppy-software package :
Where should I download the .zip (I usually put it in my Documents) ?
Do I have to run the ?
Which script do I have to edit replacing the usb port ? The one in my documents or the one created in my python2.7/dist-package ?
Thanks for your advices !

Is that post make it more clear how to install the poppy software ?

Then you can change directly your file but normally now you should not have to do it… Now the Serial port are automatically detected so there is nothing to change in the config file:

I’m so confused there was already this installation guide, I guess we can remove my posts unless you think it can help forgetful people like me.

I was trying the connection between my Mac and Poppy and I faced on the first problem. Actually, I am able to detect the motors using Herborist but it is not the same using the ipython console. Trying this code:

import pypot.dynamixel

ports = pypot.dynamixel.get_available_ports()

if not ports:
    raise IOError('no port found!')

print 'ports found', ports

print 'connecting on the first available port:', ports[0]

dxl_io = pypot.dynamixel.DxlIO(ports[0],baudrate=1000000,use_sync_read=False)

print dxl_io

print dxl_io.scan(range(60))


I get:

ports found ['/dev/tty.usbmodem1411']
connecting on the first available port: /dev/tty.usbmodem1411
<DXL IO: closed=False, port="/dev/tty.usbmodem1411", baudrate=57600, timeout=0.05>

Therefore, I do not get the list of connected motors as it happens using Herborist.

After that, I also have a problem regarding Herborist because I get the error “motors 42 did not respond after sending DxlReadDataPacket(id=42, address=16, length=1)” whenever I try to connect to each motor. It happens coding “print dxl_io.get_model([42,33])” as well.
I hope that someone will know how to fix it.

When you’re scanning using herborist are you also using the same baud rate (1000000)?

Yes and it is detecting all the motors in the right way.

Can you try this code and shows us the entire result?

import pypot.dynamixel

ports = pypot.dynamixel.get_available_ports()
baud = [57142, 1000000, ]

for p in ports:
    for b in baud:
        with pypot.dynamixel.DxlIO(p, b) as dxl:
            print dxl
            print dxl.scan()

This topic is now unlisted. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.

when i try to generate the poppy configuration file and then move it move. I try to use the following code

import time

import pypot.robot
import sys

from poppytools.configuration.config import poppy_config

poppy = pypot.robot.from_config(poppy_config)

for m in poppy.motors:
m.compliant = False

for m in poppy.motors:
m.goto_position(0, 5)


then i will get the following the Error.

DxlError Traceback (most recent call last)
in ()
4 sys.path.append(’/home/faps/poppy-software-master’)
5 from poppytools.configuration.config import poppy_config
----> 6 poppy = pypot.robot.from_config(poppy_config)

/usr/local/lib/python2.7/dist-packages/pypot-2.5.0-py2.7.egg/pypot/robot/config.pyc in from_config(config, strict, sync)
55 attached_ids = [ for m in attached_motors]
—> 56 dxl_io = dxl_io_from_confignode(config, c_params, attached_ids, strict)
58 check_motor_limits(config, dxl_io, motor_names)

/usr/local/lib/python2.7/dist-packages/pypot-2.5.0-py2.7.egg/pypot/robot/config.pyc in dxl_io_from_confignode(config, c_params, ids, strict)
114 dxl_io = DxlIOCls(port=port,
115 use_sync_read=c_params[‘sync_read’],
–> 116 error_handler_cls=handler)
118 found_ids = dxl_io.scan(ids)

/usr/local/lib/python2.7/dist-packages/pypot-2.5.0-py2.7.egg/pypot/dynamixel/io/abstract_io.pyc in init(self, port, baudrate, timeout, use_sync_read, error_handler_cls, convert)
70 self._serial_lock = threading.Lock()
—> 72, baudrate, timeout)
74 def enter(self):

/usr/local/lib/python2.7/dist-packages/pypot-2.5.0-py2.7.egg/pypot/dynamixel/io/abstract_io.pyc in open(self, port, baudrate, timeout)
94 “”"
—> 95 self._open(port, baudrate, timeout)
96“Opening port ‘%s’”, self.port,
97 extra={‘port’: port,

/usr/local/lib/python2.7/dist-packages/pypot-2.5.0-py2.7.egg/pypot/dynamixel/io/abstract_io.pyc in _open(self, port, baudrate, timeout, max_recursion)
116 if port in self.__used_ports:
–> 117 raise DxlError(‘port already used {}’.format(port))
119 # Dirty walkaround to fix a strange bug.

DxlError: port already used /dev/ttyUSB1

Could you tell me the reason? how should i do?

This is a very old version, DO NOT USE the poppy-tools package.

Please read this topic: