Faster computation

This commit is contained in:
David PAGNON 2024-03-15 10:49:32 +01:00 committed by GitHub
parent ded436e9fe
commit ce0abe1929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,8 +118,12 @@ def bodykin_from_mot_osim_func(*args):
for n in range(motion_data.getNumRows()): for n in range(motion_data.getNumRows()):
print(times[n], 's') print(times[n], 's')
# Set model struct in each time state # Set model struct in each time state
for c, coord in enumerate(coordinateNames): for c, coord in enumerate(coordinateNames): ## PROBLEME QUAND HEADERS DE MOTION_DATA_NP ET COORDINATENAMES SONT PAS DANS LE MEME ORDRE
model.getCoordinateSet().get(coord).setValue(state, motion_data_np[n,c]) try:
model.getCoordinateSet().get(coord).setValue(state, motion_data_np[n,c], enforceContraints=False)
except:
pass
model.assemble(state)
# Use state of model to get body coordinates in ground # Use state of model to get body coordinates in ground
loc_rot_frame = [] loc_rot_frame = []