pyCGM2.Model.Opensim.interface#

Interface#

osimInterface(data_path, osimFile)

Interface for interacting with OpenSim models.

osimCgmInterface(modelversion)

Interface for interacting with OpenSim CGM models.

opensimXmlInterface(templateFullFilename[, ...])

Interface for interacting with OpenSim XML files.

Filters#

opensimInterfaceScalingFilter(procedure)

Filter interface for OpenSim model scaling.

opensimInterfaceInverseKinematicsFilter(...)

Filter interface for OpenSim inverse kinematics.

opensimInterfaceInverseDynamicsFilter(procedure)

Filter interface for OpenSim inverse dynamics.

opensimInterfaceStaticOptimizationFilter(...)

Filter interface for OpenSim static Optimisation.

opensimInterfaceAnalysesFilter(procedure)

Filter interface for OpenSim Analysis Report.

Procedures#

scaling#

ScalingXmlProcedure(DATA_PATH, mass, height)

Procedure for scaling XML processing in OpenSim.

ScalingXmlCgmProcedure(DATA_PATH, ...)

Procedure for scaling XML processing specific to the CGM model in OpenSim.

kinematic fitting#

InverseKinematicXmlProcedure(DATA_PATH, ...)

Procedure for handling inverse kinematics in OpenSim using XML configuration.

InverseKinematicXmlCgmProcedure(DATA_PATH, ...)

Specialized procedure for handling inverse kinematics in OpenSim using XML configuration for the CGM model.

inverse dynamics#

InverseDynamicsXmlProcedure(DATA_PATH, ...)

Provides a procedure for setting up and executing inverse dynamics analyses in OpenSim.

InverseDynamicsXmlCgmProcedure(DATA_PATH, ...)

Specialized procedure for handling inverse dynamics analyses in OpenSim, specifically tailored for CGM models.

static optimization#

StaticOptimisationXmlProcedure(DATA_PATH, ...)

Handles the setup and execution of static optimization analyses in OpenSim.

StaticOptimisationXmlCgmProcedure(DATA_PATH, ...)

Specialized procedure for handling static optimization analyses in OpenSim, specifically tailored for CGM models.

analysis report#

AnalysesXmlProcedure(DATA_PATH, ...)

Handles the setup and execution of various analyses in OpenSim using XML configurations.

AnalysesXmlCgmProcedure(DATA_PATH, ...)

Specialized procedure for handling analyses in OpenSim, specifically tailored for CGM models.

AnalysesXmlCgmDrivenModelProcedure(...)

Specialized procedure for handling analyses in OpenSim using CGM-driven models.

Additional procedures#

base procedure#

OpensimInterfaceXmlProcedure()

A base class to provide an interface for handling XML procedures in OpenSim.

Kalman kinematic fitting#

KalmanInverseKinematicXmlCgmProcedure(...)

Procedure for handling Kalman-filter-based inverse kinematics in OpenSim for the CGM model.

Legacy OpenSim filters#

GeneralOpensimCalibrationProcedure()

General procedure for calibrating an opensim model

CgmOpensimCalibrationProcedures(model)

Model-embedded Procedure for calibrating an opensim model

GeneralOpensimFittingProcedure()

General procedure for Fitting a motion on the osim file

CgmOpensimFittingProcedure(model)

Model-embedded Procedure for fitting an opensim model

opensimCalibrationFilter(osimFile, model, ...)

Filter calibrating (scaling) an OpenSim model from a calibrated pyCGM2 model.

opensimFittingFilter(ikToolFile, ...[, accuracy])

Filter running the OpenSim inverse kinematics of a calibrated OpenSim model.

OpenSim files#

ImuStorageFile(DATA_PATH, filename, freq)

Writer of an OpenSim IMU orientation (quaternion) storage file.

OpensimDataFrame(DATA_PATH, filename)

OpenSim storage (sto/mot) file loaded as a pandas dataframe.

TrcDataFrame(DATA_PATH, filename)

TRC reader/writer using a pandas DataFrame as the internal representation.

OpenSim processing#

opensimModel(osimFile, cgmModel)

Wrapper of an OpenSim model associated with a pyCGM2 model.

opensimKinematicFitting(osimModel, ikToolFiles)

Wrapper of the OpenSim inverse kinematics tool.

globalTransformationLabToOsim(acq, R_LAB_OSIM)

transform all markers into the the opensim global coordinate system

setGlobalTransormation_lab_osim(axis, ...)

return the rotation matrix expressing the opensim global coordinate system to the laboratory coordinate system

smartTrcExport(acq, filenameNoExt)

save as a trc file

sto2pointValues(storageObject, label, R_LAB_OSIM)

transform an element of a storage instance into the Laboratory coordinate system.

mot2pointValues(motFilename, labels[, ...])

convert an element of an opensim mot file into a btk-point values (ie array(n,3) with n: the number of frames)