[Assembly instructions] Take care of the Dynamixel motors configuration and assembly!

I tried to install the driver and it did not work any better unfortunately. We also tried herborist on a Debian Wheezy, and it did not work either…

Can you copy/paste the error you get ?
Is pyQt installed ?

if yes, here we go for a debug procedure :smile:

Open a terminal and run python then copy paste these lines:

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 'opened port {} with baudrate {} and dectected motor ids:{}'.format(p, b, dxl.scan(range(10)))

Are these command run correctly ?

The output I get from herborist is:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pypot/tools/herborist/herborist.py", line 203, in run
    model = dxl_io.get_model((id, ))[0]
  File "/Library/Python/2.7/site-packages/pypot/dynamixel/io/abstract_io.py", line 228, in get_model
    models = [dxl_to_model(m) for m in self._get_model(to_get_ids, convert=False)]
  File "/Library/Python/2.7/site-packages/pypot/dynamixel/conversion.py", line 132, in dxl_to_model
    return dynamixelModels[value]
KeyError: 512

I ran the code and got the following error:

Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
TypeError: list indices must be integers, not str

This let me think that there is noise on the line. The model should not be 512.
Have you try with a single motor at the time?

I’ve modified @Matthieu’s example. There was a typo. Can you try again ?

Hi Pierre,
this problem seems quite strange. I also installed roboplus software on windows, and tried dynamixel wizard, and it did not detect the motors either. It was listing a lot of motors with the name “unknown” and we could not change anything to them (not the id or baudrates). It is strange as at each time we were only connecting a single motor.

This morning I tried with a motor MX-28AT, and herborist displayed the same error:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pypot/tools/herborist/herborist.py", line 203, in run
    model = dxl_io.get_model((id, ))[0]
  File "/Library/Python/2.7/site-packages/pypot/dynamixel/io/abstract_io.py", line 228, in get_model
    models = [dxl_to_model(m) for m in self._get_model(to_get_ids, convert=False)]
  File "/Library/Python/2.7/site-packages/pypot/dynamixel/conversion.py", line 132, in dxl_to_model
    return dynamixelModels[value]
KeyError: 512
Exception TypeError: "'NoneType' object is not callable" in <bound method DxlIO.__del__ of <DXL IO: closed=False, port="/dev/tty.usbserial-A9007E5U", baudrate=1000000, timeout=0.05>> ignored

Running your code, it displayed the message:

opened port /dev/tty.usbserial-A9007E5U with baudrate 57142 and dectected motor ids:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
opened port /dev/tty.usbserial-A9007E5U with baudrate 1000000 and dectected motor ids:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

so i guess this is good news

If even their software can not scan them, this is really problematic…

Well actually not really… You can ping motors with two different baud rates…That should not happen. I guess it just interpret the noise on the bus as an answer from a motor.

There seems to be “something” just writing on the bus. Can you try the following things:

  • First, try to scan the bus (either with the dynamixel wizard or pypot) when no motor are connected. If it still finds something then it’s either coming from a wire, the usb2ax, the RS485 thing, or the alim?
  • If this seems ok, can you try to flash the firmware from a motor using the dynamixel wizard and try scanning again?

hum, i tried just with the usb2dynamixel with no motors connected.
When putting the dongle on ttl mode (the usual one), this code still outputs the list:

opened port /dev/tty.usbserial-A9007E5U with baudrate 57142 and dectected motor ids:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
opened port /dev/tty.usbserial-A9007E5U with baudrate 1000000 and dectected motor ids:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

when i switch to rs485 mode, the message seems more coherent:

opened port /dev/tty.usbserial-A9007E5U with baudrate 57142 and dectected motor ids:[]
opened port /dev/tty.usbserial-A9007E5U with baudrate 1000000 and dectected motor ids:[]

When switching to RS232 mode, it outputs the same message:

opened port /dev/tty.usbserial-A9007E5U with baudrate 57142 and dectected motor ids:[]
opened port /dev/tty.usbserial-A9007E5U with baudrate 1000000 and dectected motor ids:[]

What do you mean by flashing the firmware with dynamixel wizard?

You are using MX motors right? So you should use TTL!

The RS thing I was referring to is this device:

So if you are having an answer from the scan even without no motors when using TTL there is definitely something wrong with the wiring or one of the eletronical device. Can you try to replace them all (wire, usb2dynamixel…)?

yes i know, i use ttl. I just tested the other modes to see what it outputs.

I also tried with dynamixel wizard, and it outputs the same when i plug in motors as when i have NO motors plugged.
Maybe it is the usb2dynamixel, it is an old one that was used in other projects…
How can I flash the firmware from a motor using the dynamixel wizard ?

Hi,
I got a new usvb2dynamixel, and i got it working now with dynamixel wizard on windows.
herborist can detect my motors, but would crash when i try to update eeprom.

I just got a similar error i.e. all IDs respond to the ping.
It was just because there were 2 motors with the same ID number on the bus.