As pointed out in the KINARM User Guides, the motion control card the controls the KINARM robots samples the kinematic data at ~1.129 kHz, and that data is then re-sampled and saved at 1 kHz. It is possible that someone might want to re-create the original time-steps. Attached is code that can help with that.
However, there are some caveats. Re-creation of the time-steps is done by using the velocity and position signals can calculating what delta-t must have been. This approach is only possible for non-zero velocities. Furthermore, at velocities near zero, there can be some rounding error that give erroneous results. Given that the most likely use for such information is to perform other kinematic analyses (e.g. calculate jerk), small errors when V ~ 0 are unlikely to cause problems in such situations.
That attached code is not perfect, but gives a starting point to start performing this calculation, if it were necessary.
I am trying to calculate the instantaneous rate of length change of a spring and apply a resulting damping force. I tried to pass the hand position from one tilmestep previous to the loads function using a memory block, but this did not work.
In my function, I calculated the change in spring length and then multiplied by 1000, assuming 1 kHz sampling rate. I have also previously tried using the scalar projection of the hand velocity onto the spring vector, but this did not entirely work either.
Is there a better way to solve this problem, and does the sampling rate of 1.129kHz mean that I should actually multiply the change in length by 1129 to get the velocity in m/s? Thanks