How Can I Improve the Execution Speed of txRxPacket?

I am currently controlling an OpenManipulator X with OpenCR 1.0 using DynamixelSDK in Python on Vscode. I have modified the Sync_Read_write.py file from the Python examples of DynamixelSDK to store various information from 5 motors (ADDR 63, 122, 123, 124, 126, 128, 132, 136, 140) into an Excel file.

However, there is an issue where it takes too long to repeat the loop. To identify the cause, I conducted an experiment and found that each .txRxPacket command takes about 5 to 6 ms. Moreover, when I include all the information I need, it takes at least 55 ms each time, although the exact time varies with each execution.

I want to resolve this issue to quickly receive various information from the motors. To achieve this, should I change the connector type for the OpenCR 1.0? Or is there a command that can read multiple pieces of information at once?

Thank you.

Issue: Too slow execution speed of txRxPacket

PROVIDE A THOUROUGH DESCRIPTION OF YOUR ISSUE, THE MORE DETAIL YOU PROVIDE THE EASIER IT WILL BE FOR THE COMMUNITY TO PROVIDE YOU ASSISTANCE


DYNAMIXEL Servo: XM430-W350-T

LIST ALL DYNAMIXEL SERVOS USED IN THIS PROJECT


DYNAMIXEL Controller: OpenCR 1.0

LIST ALL DYNAMIXEL CONTROLLERS USED IN THIS PROJECT


Software Interface: DynamixelSDK, Python 3.10, VsCode

LIST ALL SOFTWARE INTERFACES USED IN THIS PROJECT

From my experience with RPi C/C++ codes are faster than Python. Can you switch your language?

Or use txOnly type of methods?

image


Are you using your PC to develop Python code and the OpenCR-1 just as a DXL communication device via USB? Then have you reduced the USB Latency Timer yet?

There are a couple of ways that you can speed up the execution time of your command (arranged roughly by what I think is easiest):

  1. Adjusting the Return Delay time might speed up communications enough that you don’t need to do anything else.
  2. Lining up the registers you need in Indirect Address space can make reading the multiple registers you need much more efficent.
  3. Fast Sync Read can greatly reduce the time to receive read results, by combining all the responses into a single large packet.