removed logging errors to make sure tests don't pass in case of problems
This commit is contained in:
parent
65e675ab64
commit
3e31eaf50f
@ -191,11 +191,7 @@ def calibration(config=None):
|
|||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|
||||||
try:
|
|
||||||
calibrate_cams_all(config_dict)
|
calibrate_cams_all(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during calibration: {e}")
|
|
||||||
return
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
logging.info(f'\nCalibration took {end-start:.2f} s.\n')
|
logging.info(f'\nCalibration took {end-start:.2f} s.\n')
|
||||||
@ -239,11 +235,7 @@ def poseEstimation(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
rtm_estimator(config_dict)
|
rtm_estimator(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during pose estimation: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end - start
|
elapsed = end - start
|
||||||
@ -287,11 +279,7 @@ def synchronization(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
synchronize_cams_all(config_dict)
|
synchronize_cams_all(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during synchronization: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end-start
|
elapsed = end-start
|
||||||
@ -338,11 +326,7 @@ def personAssociation(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
track_2d_all(config_dict)
|
track_2d_all(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during person association: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end-start
|
elapsed = end-start
|
||||||
@ -388,11 +372,7 @@ def triangulation(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
triangulate_all(config_dict)
|
triangulate_all(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during triangulation: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end-start
|
elapsed = end-start
|
||||||
@ -437,11 +417,7 @@ def filtering(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}\n")
|
logging.info(f"Project directory: {project_dir}\n")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
filter_all(config_dict)
|
filter_all(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during filtering: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
logging.info('\n')
|
logging.info('\n')
|
||||||
|
|
||||||
@ -482,11 +458,7 @@ def markerAugmentation(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
augmentTRC(config_dict)
|
augmentTRC(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during marker augmentation: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end-start
|
elapsed = end-start
|
||||||
@ -531,11 +503,7 @@ def kinematics(config=None):
|
|||||||
logging.info(f"Project directory: {project_dir}")
|
logging.info(f"Project directory: {project_dir}")
|
||||||
logging.info("---------------------------------------------------------------------\n")
|
logging.info("---------------------------------------------------------------------\n")
|
||||||
|
|
||||||
try:
|
|
||||||
kinematics(config_dict)
|
kinematics(config_dict)
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"Error during OpenSim processing: {e}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
elapsed = end - start
|
elapsed = end - start
|
||||||
|
@ -489,7 +489,6 @@ def kinematics(config_dict):
|
|||||||
- Joint angle data files (.mot) for each person.
|
- Joint angle data files (.mot) for each person.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
|
||||||
# Read config_dict
|
# Read config_dict
|
||||||
project_dir = config_dict.get('project').get('project_dir')
|
project_dir = config_dict.get('project').get('project_dir')
|
||||||
# if batch
|
# if batch
|
||||||
@ -563,5 +562,3 @@ def kinematics(config_dict):
|
|||||||
perform_IK(trc_file, kinematics_dir, osim_setup_dir, model_name, remove_IK_setup=remove_IK_setup)
|
perform_IK(trc_file, kinematics_dir, osim_setup_dir, model_name, remove_IK_setup=remove_IK_setup)
|
||||||
logging.info(f"\tDone. OpenSim logs saved to {opensim_logs_file.resolve()}.")
|
logging.info(f"\tDone. OpenSim logs saved to {opensim_logs_file.resolve()}.")
|
||||||
logging.info(f"\tJoint angle data saved to {(kinematics_dir / (trc_file.stem + '.mot')).resolve()}\n")
|
logging.info(f"\tJoint angle data saved to {(kinematics_dir / (trc_file.stem + '.mot')).resolve()}\n")
|
||||||
except RuntimeError as e:
|
|
||||||
logging.error(f"Error occurred: {e}")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user