Sample rate of current position


I am developing a way to control Reachy’s right arm with my keyboard. I am using Pygame and I’m implementing collision control, for that I need the current position of the motors. However, I need to synchronize Pygame’s fps to the sample rate at which the current positions are being sampled so the game stops giving inputs if the current position is not changing (a.k.a. collision).

I ran a few experiments and I’m getting a feeling that the arm samples the current position at around 5Hz, which is extremely low for my use case. Could anyone tell me what is the theoretical sample rate and if there’s a way of making it larger (via hardware or software)?

Thank you very much!


I ran across the dxl config file from pyluos and realized that I can access a variable called “sample rate” through:

>>> 100

And I can actually change the variable, however it doesn’t match at all the sampling frequency that I am receiving, and it doesn’t do anything if I modify it.