ImuPlacerXMLProcedure#
- class pyCGM2.IMU.opensense.interface.procedures.opensenseImuPlacerInterfaceProcedure.ImuPlacerXMLProcedure(DATA_PATH: str, genericOsimFile: str)#
- OpenSense IMU placer procedure for setting up and running IMU calibration with OpenSim. - Parameters:
- DATA_PATH (str) – Data path where the OpenSim model and results will be stored. 
- genericOsimFile (str) – Path and filename of the generic OpenSim model file (.osim). 
 
 - __init__(DATA_PATH: str, genericOsimFile: str)#
- Initializes the ImuPlacerXMLProcedure with the specified data path and generic OpenSim model file. 
 - Methods - __init__(DATA_PATH, genericOsimFile)- Initializes the ImuPlacerXMLProcedure with the specified data path and generic OpenSim model file. - finalize()- Finalize the procedure after running, including any post-processing steps. - prepareBaseImu(segmentName, heading)- Set the base IMU and its heading axis for the calibration procedure. - prepareImu(osimBody, imuInstance)- Assign an IMU instance to an OpenSim model body. - prepareImuMapper(imuMapperDict)- Prepare the IMU mapper, associating OpenSim model bodies with IMU instances. - prepareOrientationFile(staticFilenameNoExt, freq)- Prepare the orientation file (STO file) from IMUs for static calibration. - prepareSensorToOpensimRotation(eulerAngles)- Prepare Euler angles to align sensors to the OpenSim global coordinate system. - Prepare and update the XML associated with the IMU placer setup file. - run()- Run the IMU placer procedure using the prepared setup. - setSetupFile(imuPlacerToolFile)- Set the setup file for the IMU placer tool. - finalize()#
- Finalize the procedure after running, including any post-processing steps. 
 - prepareBaseImu(segmentName: str, heading: str)#
- Set the base IMU and its heading axis for the calibration procedure. - Parameters:
- segmentName (str) – Segment name associated with the base IMU. 
- heading (str) – The heading axis for the base IMU. 
 
 
 - prepareImu(osimBody: str, imuInstance: Imu)#
- Assign an IMU instance to an OpenSim model body. - Parameters:
- osimBody (str) – Name of the body in the OpenSim model. 
- imuInstance (imu.Imu) – A pyCGM2 IMU instance. 
 
 
 - prepareImuMapper(imuMapperDict: Dict)#
- Prepare the IMU mapper, associating OpenSim model bodies with IMU instances. - Parameters:
- imuMapperDict (Dict) – Dictionary mapping OpenSim body names to IMU instances. 
 
 - prepareOrientationFile(staticFilenameNoExt: str, freq: int, order: List = [0, 1, 2, 3])#
- Prepare the orientation file (STO file) from IMUs for static calibration. - Parameters:
- staticFilenameNoExt (str) – Name of the STO file to be created for static calibration. 
- freq (int) – Sampling frequency of the IMU data. 
- order (List, optional) – Quaternion reordering. Defaults to [0, 1, 2, 3]. 
 
 
 - prepareSensorToOpensimRotation(eulerAngles: List)#
- Prepare Euler angles to align sensors to the OpenSim global coordinate system. - Parameters:
- eulerAngles (List) – List of 3 Euler angle values in radians. 
 
 - prepareXml()#
- Prepare and update the XML associated with the IMU placer setup file. 
 - run()#
- Run the IMU placer procedure using the prepared setup. 
 - setSetupFile(imuPlacerToolFile: str)#
- Set the setup file for the IMU placer tool. - Parameters:
- imuPlacerToolFile (str) – Path and filename of the OpenSense IMU placer setup file. 
 
 
