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
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.
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 ?
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?
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 ?
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.
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.