thomas-haslwanter / scikit-kinematics

Python functions for working with 3D kinematics.
Other
126 stars 45 forks source link

How to compute distance from positions? #40

Closed ogreyesp closed 3 years ago

ogreyesp commented 4 years ago

Hello

I'm very interesting to use this library in my daily work, but I´m having some problems to adapt it.

I have seen that the function calc_position computes velocity and position.

1- How I can calculate the distance travelled by a user from the list of positions calculated? 2- How I can obtain the specific velocity value in each time step instead of the accumulative value?

Also, I have noted that when "Kalman" option is provided, the operation np.deg2rad is automatically done, How come? What if my data is initially in rad/seg?

Best regards

thomas-haslwanter commented 3 years ago

ad 1) The distance traveled is the last position minus the first position. (Do I miss something here?) ad 2) "cumtrapz" provides the velocity value at eat time step. ad "Kalman") If your data are in rad/sec, you have to apply np.rad2deg before you apply the Kalman filter.