myoconverter.conversion_steps.O2MStep1

This script includes all the steps of transfering an OpenSim model to Mujoco.

Created on Tue Jul 27 23:19:13 2021

@author: hwang

Module Contents

Classes

BasicModelConvert

Class convert OpenSim MSK model to MuJoCo xml format.

class myoconverter.conversion_steps.O2MStep1.BasicModelConvert(osim_model_file, geometry_path, saving_path, add_ground_geom=False, treat_as_normal_path_point=False)[source]

Class convert OpenSim MSK model to MuJoCo xml format.

Bodies, joints, muscles, ligaments, sites, constraints are all converted. Forward kinematic check is perfomed for validating the accuracy of the bone shapes and joint definitions.

cvt1_ModelConvert()[source]

Convert the osim model into mujoco using the functions in xml folder

vlt1_forwardKinematicsValidation(mjc_model_path=None, end_points_osim=None, speedy=False)[source]

Forward kinematic check Use markers at the surface of the body to compare the end point positions based on the same joint angle setups in both models.

Parameters:

mjc_model_path: string

The mujoco model path.

end_points_osim: list of strings

A list of marker names that defined in the Osim model for the forward kinematic check

speedy: boolean

If True, run lower number of posture check [5 <–> 10].

endPointsPlot(end_pos_osim, end_pos_mjc, end_points)[source]