utils.UtilsForceOpt

Created on Wed Jul 28 12:54:25 2021

@author: hwang

Module Contents

Functions

initializeWorker(→ None)

Initialize the worker process.

objFMMuscle(x, osim_fm, muscle, joints, jnt_arr, act_arr)

Calculate the muscle force differences between osim and mjc models.

getMuscleForceDiff(mjc_model, muscles, joints, ...)

Check if the muscle force differences between the osim and mjc models are beyond

fmOptPSO_cust(mjc_model_path, muscle, joints, jnt_arr, ...)

utils.UtilsForceOpt.initializeWorker(shared_model) None[source]

Initialize the worker process.

INPUTS:
shared_model

the mujoco model

utils.UtilsForceOpt.objFMMuscle(x, osim_fm, muscle: str, joints: List[str], jnt_arr, act_arr)[source]

Calculate the muscle force differences between osim and mjc models.

INPUTS:
x: vector

optimizing parameters

osim_fm: vector/mat

muscle force vector/matrix of a given muscle

muscle: string

muscle name

joints: list of string

a list of unique coordinate that affecting the muscle length

jnt_arr: list

a list of joint angle values for the above unique coordinates

act_arr: list

a list of muscle activation values

OUTPUTS:
rms_fm: double

the RMS value of muscle force map differences

utils.UtilsForceOpt.getMuscleForceDiff(mjc_model, muscles, joints, jnt_arr, act_arr, osim_fp_muscle_joints)[source]

Check if the muscle force differences between the osim and mjc models are beyond thresholds

utils.UtilsForceOpt.fmOptPSO_cust(mjc_model_path, muscle, joints, jnt_arr, act_arr, osim_fm, optParam_lb, optParam_ub, cost_org, speedy=False)[source]