Hi everyone,
I am working on a research project about control of bipedal locomotion. We have built a biped robot with 7 Dynamixel XH540-150W-R servos at the back, hip, knee, and ankle joints. Our biped robot is 36 cm in height and 3 kg in weight and controlled by a Jetson Xavier NX.
First, we wanted to use the synchronous read (sync_read) method to speed up the communication via servos. Unfortunately, we detected some byte repetitions in the sync_read response packages when we apply small force to the torque enabled servos.
In detail, we read 13 bytes from indirect addresses 40 times per second (40 Hz sampling frequency) from each servo as shown in “13 bytes snyc_read.png”. Basically, we read current (2 bytes), velocity (4 bytes), position (4 bytes), input voltage (2 bytes), and temperature (1 byte) data by using Protocol 2.0. Under this scenario, packet length should be 17 (x11) by addition of LEN1, LEN2, INST, ERR bytes.
For a reason that we do not understand, servo responses sometimes extend to 18 as you can see in “Case A.jpg” where servo with ID 2 sends a prolonged status packet at the 191th time step. In this faulty packet, underscored byte 253 (xfd) with red is a repetition.
This extra byte causes wrong data transfer, such as impossible voltage and temperature measurements. By using this information, we may detect abnormal status packages and re-ask for the corrupted data packages. Our solution may not work every time as you may see in “Case B.jpg”. This anomaly may continue consecutive status packages for 20-40 millisecond duration.
To sum up, no communication error is detected at RS485. Status package length is extended by servo as you can see in the package content, so CRC check is validated. There are no power-related problems as can be validated by voltage and current readings. It is interesting to see that the repeating byte is 253(xfd) for each experiment, but we are not sure this situation is fixed, further observation may be required.
Finally, we are struggling with this problem for months. If we get any help, we will be very happy - because we cannot stabilize sampling frequency under this situation.
Best regards
![]() |
2022-02-18 22:18:06 |
Eemchar |
please check byte stuffing process in the below link
https://emanual.robotis.com/docs/en/dxl/protocol2/#packet-process
i hope it would be helpful for your project
![]() |
2022-02-22 10:30:16 |
gaiajoypop |
Hi gaiajoypop,
Thank you for your help. Although I carefully read the documentation before, I did not notice the byte stuffing. In the same link, I see that byte stuffing is not applied to fast sync read and fast bulk read status packages. Is byte stuffing applied to all other instructions and their returning packets, such as read, write instructions, and their status packets?
Best regards,
![]() |
2022-03-02 04:39:20 |
Eemchar |
To Eemchar.
I am so glad to hear that my post was helpful to you.
Byte stuffing process has been applied to all instructions in protocol 2.0 until new instructions(fast sync read, fast bulk read) were released.
Best regards
![]() |
2022-03-02 12:09:56 |
gaiajoypop |