Sample rate of current position

Hello!

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!

Update:

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

reachyRobot.right_arm.elbow_pitch._motor.sampling_freq
>>> 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.

Hi @JEMartin ! The value returned is hardcoded and does not reflect the actual sampling frequency.

Unfortunately, without direct access to a Reachy 2019 arm, it’s challenging for us to provide the exact sampling rate you’re experiencing. This discrepancy could be due to various factors, including software settings or limitations in the hardware.

If you have any further questions, please feel free to ask. Good luck with your project!