...
POST No. 2408041
Control of Dynamixel Motors with Latencies < 1ms?
2021-05-03 00:19:54 robotcreator94
Hello to all,

I am currently writing my master thesis on an experimental setup using two Dynamixel XM430-W210 Servo Motors.

For this project, I am writing a controller using C++, which shall be customizeable by our students later on
in the context of a lecture concerning model-based robot control. I am using the following setup:

- 2x Dynamixel XM430-W210
- Dynmixel SDK with Protocol 2.0
- U2D2 Power Hub Board
- Ubuntu 20.04

Now my question:
Is it possible to reduce the USB Latency when reading out the motor states to a value
significantly lower than 1 ms? I have already reduced the USB Latency of the port /dev/ttyUSB0
to 1 ms and used group_sync_read / group_sync_write, respectively.

Now I have measured the actual reading and writing times: Reading time max is now about 1.1 ms,
writing time is significantly lower than 0.1ms.

So, the bottleneck of the controller speed is actually the time needed to read out the Dynamixel motors.
I have tried to reduce the latency further but this is not allowed by the system.

So, my question is: What could be done to improve this? Could using a different Linux Kernel
be a solution or using another interface (RS232, RS485 directly using Raspberry Pi or similar, ...) to control the motors?
The motors themselves use RS-485 as communication protocol. I have read quite a bit already, but I'm not sure which path to take.
Would be grateful for your advice.

Best regards,
Martin



2021-05-03 00:19:54
robotcreator94
2021-05-03 13:33:30 Will Son

Hi Martin,


Unfortunately, 1ms delay is the minimum latency that is provided by the USB device and I'm afraid that there's no other way to achieve smaller delay than this on your PC.

Using a RS-485 interface directly from SBC may help a bit, but since the OS is not a real-time and there could be some unexpected delays.

Plus, configuring a stable communication circuit on the SBC could be another hassle.

If you are using an embedded board to control DYNAMIXEL, you can get around with this delay more easily.


Although below method won't help decreasing the delay, it'll increase the speed of communication.

- Set the Return Delay Time to "0"

- Use higher baudrate such as 3Mbps ~ 4.5Mbps if possible.

- Read necessary data only from DYNAMIXEL using Indirect Address / Indirect Data + Sync Read/Write


Thank you.

2021-05-03 13:33:30
willson
2021-05-03 17:48:10 Martin Dehmel
Hello, thanks for your quick and informative reply.
I had already implemented all the measures you advised.
Never the less, I'm quite satisfied with the overall performance up to this point.

Speaking of embedded boards to control the Dynamixel Motors, can you recommend
any good one for this application? I would be very interested in that for future developments.

Regards,
Martin

2021-05-03 17:48:10
robotcreator94
2021-05-04 13:06:49 Will Son

Hi Martin,


Could you send us an email at support@robotis.com with referring to this thread?

I'd like to discuss more details about this, but there could be an information that cannot be disclosed.

Thanks!

2021-05-04 13:06:49
willson
2021-05-04 16:39:58 Martin Dehmel
Hi willson,

thanks, I've just send an email to support@robotis.com.

Best regards,
Martin
2021-05-04 16:39:58
robotcreator94
2021-05-05 21:44:35 Martin Dehmel
Did you get my message?
comment
2021-05-06 09:08:43 willson
Sorry, it was a national holiday yesterday.
I did receive your email! Thank you.
2021-05-06 09:08:43
willson
2021-05-05 21:44:35
robotcreator94