Closed mrrezaie closed 3 years ago
Hi @mrrezaie !
First you have to make sure you remove data where forces are too small (i.e., no forces on force platform). because it does not make sense to compute center of pressure where there is no pressure (this is why you get such values). Your BTK graphs ranges from 5.0 to 6.0 second, while the ezc3d one ranges from 0 to the end of the trial. You can set a threshold on force norm. For instance:
import numpy as np
[...]
idx = np.linalg.norm(forces, axis=0) > 50
With that you get values within a normal range.
Still they are not strictly equal, it is because BTK are not using the same way to compute the geometrical center for the force plate. BTK is using the mean from the corners 0 and 2, while I use the mean of all 4 corners
Thanks @pariterre for the response.
You are right. I cropped the MOKKA data just for better observation. But at the time of each foot contact on each force plate, the COP data is absolute zero. I created a MOT file for OpenSim and the COPs stop over the lab origin. There was no such problem with other c3d files.
Anyway, It might not be an important issue. I was testing my script for c3d to OpenSim files conversion over several c3d files and I though you might be interested in this file.
Have a great time.
Regards, Mohammadreza
That is weird.. Using the file you provided me, I get the same values (when cropped using the snippet I gave you), I get the same results as the figure you provided..
@mrrezaie Should I close this issue?
Thanks for your time.
Hi Pariterre,
Sorry for opening another issue. There is a problem with COP calculations for this c3d file. The results are around zero. I used the following scripts for plotting the COP of the 1st force plate:
c = c3d('gait.c3d', extract_forceplat_data=True) cop = c["data"]["platform"][0]['center_of_pressure']
But in MOKKA, I have these data:
I attached the file. Would you please take a look? Gait.zip
Thank you in advance.