Herborist can't see my motor

I’m trying to configure a motor using herborist. The motor is brand new so its ID should be 1 and baud rate 57142.

My setup is computer with ubuntu - USB2AX - SMPS2DYNAMIXEL (powered) - MX-28AT

When I start herborist, the GUI appears, a /dev/ttyACM0 port is found. I can scan, but I find nothing. I have this error on the terminal:

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/manon/.config/ibus/bus
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon

Any idea of what fails ? Am I in this case http://www.xevelabs.com/doku.php?id=product:usb2ax:faq#qdynamixel_sdkhow_do_i_use_it_with_the_usb2ax ?

I tried directly with Python and it works (code below for those who want to test).

And now herborist sees my motor (there are a few bugs while trying to change id, for example). No idea what I changed, maybe a port was not closed ?

run as superuser:

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=57600)

print "scanning"
found =  dxl_io.scan(range(20))
print found

dxl_io.set_return_delay_time({1 : 0})
dxl_io.change_id({1 : 12})
dxl_io.change_baudrate({12 : 1000000})

dxl_io.close()

dxl_io = pypot.dynamixel.DxlIO(ports[0], baudrate=1000000)
print "scanning"
found =  dxl_io.scan(range(20))
print found
dxl_io.close()

I never saw this error but I remember on Linux system it may have user group permission problem to access ports.
It is maybe why you have to run your code as sudo ?

BTW the herborist tool is quite instable and there is an open CFC about it. Alternatively, there is a pending pull request script (by @aristofor) on pypot to avoid the use of herborist to tune dynamixel motors.

Hi Matthieu,

I already added myself in the dialout group and the code was run using sudo. And I remember using herborist during the training session at Cap Science so I was surprised when it failed.

But now it works so lets go on. I will see if I can improve herborist as soon as I have a functional Poppy.

I just remarked something : herborist looks at baudrate 57142 while my python file (mostly copied from the doc) looks at 57600. If I put 57142, it fails. Could it be the reason ?

Yep it is not clear which baudrate value is the good one. It seems it change from one system to another…

Hi @Manon, sorry for the late answer but I was in holidays.

This error does not look at all like a Python error. It seems to directly be a Qt error. Can you post the whole output? And also when does this happens?

Hi Pierre,

This is the whole error. But it fact, herborist sees my motors when they have baudrate at 1 000 000 (I can move them and all). And it outputs the same message.
The problem in fact seems related to the frequency 57142: with low-level library, it works with frequency 57600 but not 57142.

This is indeed a very old bug in pypot. I never really fixed it as I don’t fully understand it. It seems to be OS dependant. Anyway, I’ll change it the baud rate to 57142 in herborist as soon as I can.

For the rest of the error this is really strange. Can you try to open a serial bus in python with the “wrong” baud rate 56000 and see what’s happened ?

Well, for me, 57600 is the “right” baudrate…

I just ran a few tests: When I run herborist (with sudo), the error appears after a few seconds, even if I did not click on anything. Herborist works well with motors on baudrate 1 000 000, but don’t see motors on 57142 (I have a brand new motor pluggued).

I tried to remove my USB mouse, but it did not remove the error.

Using the following code:

dxl_io = pypot.dynamixel.DxlIO(ports[0], baudrate=my_baud)
print "scanning"
found =  dxl_io.scan(range(60))
print found
dxl_io.close()

if my_baud is 57600, no error and I get [1]. If my_baud is 57142, no error and I get [] (motor not seen).

Edit : I dived a bit deeper into herborist and managed to change the baudrate to 57600 instead of 57142 and herborist did see my new motor.

I have a Ubuntu 14.04 on a Lenovo Thinkpad T410s.

Ok I think I got it. Where you using an USB2AX?
On my laptop, both baud rates 57142 and 57600 are working with an USB2Dynamixel but only the 57600 is working with the USB2AX.

It should be fixed in version 2.3.1:

2 Likes

You’re right, I am using USB2AX. So problem solved.