unitreerobotics / z1_sdk

SDK tools for controlling z1 robot
BSD 3-Clause "New" or "Revised" License
17 stars 18 forks source link

1kHz control rate #8

Open Sergim96 opened 4 months ago

Sergim96 commented 4 months ago

Hi all!

According to the specs of the robot, it is possible to control it at 1kHz. However, I have been struggling to reach any control rate higher than 500Hz.

I have tested this by modifying the lowcmd_development.cpp example by changing the dt attribute and setting it to 1ms.

This change does not seem to have any effect as the function sendRecv seems to be blocking the code and have a hard-coded sleep time of 2ms, which prevents any control higher than 500Hz.

Is there any way to bypass this issue and obtain the advertised 1kHz control rate?