Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Fix muscle models #26

Closed
wants to merge 159 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
2a9d090
Initial commit: add GM foot model files
divyaksh-chander Feb 9, 2023
24b6c72
make new free posture example file for testing with GM foot
divyaksh-chander Feb 9, 2023
d713362
Move GM foot class templates to generic body model folder and include…
divyaksh-chander Feb 9, 2023
c358016
Add LIGAMENT_DRIVER ifdef check
divyaksh-chander Feb 9, 2023
11281d0
Add ligament draw settings in default draw settings file
divyaksh-chander Feb 9, 2023
0e3cdc8
Load GM foot model with incorrect ankle joint
divyaksh-chander Feb 9, 2023
5ce79df
Rename AnyViaPointLigament to AnyLigamentViaPoint
divyaksh-chander Feb 9, 2023
f272392
Use ankle joint definition from GM foot model
divyaksh-chander Feb 9, 2023
25b92f4
Add drivers for free posture model
divyaksh-chander Feb 13, 2023
0ebeeaa
Include and fix MetatarsalHeadContact. Kinematics runs now
divyaksh-chander Feb 13, 2023
9e42272
include simple muscles for leg and foot
divyaksh-chander Feb 13, 2023
3dc6be6
Remove model specific draw settings and use default draw settings. fi…
divyaksh-chander Feb 13, 2023
65a0230
Rename muscle classes from Any*Muscle to AnyMuscle*
divyaksh-chander Feb 13, 2023
49f25fe
move define statement for Metatarsal Head Contact to main file
divyaksh-chander Feb 13, 2023
792abe2
Restructure GM Foot segments. move foot segments under foot folder
divyaksh-chander Feb 14, 2023
175fd00
Restructure GM Foot joint. Rename jnt.FootJnt to jnt.Foot
divyaksh-chander Feb 14, 2023
d006ba4
Add mocap model example from GM foot repository
divyaksh-chander Feb 15, 2023
6e56d78
Update git ignore to keep P-i-G simple gm foot output file LE_BareFoo…
divyaksh-chander Feb 15, 2023
6345e30
Update path statements to gm foot folder
divyaksh-chander Feb 15, 2023
b65ff10
update marker protocol to include seg.foot.(foot segment) and add Sca…
divyaksh-chander Feb 15, 2023
a3a41ff
Restructure GM foot model tree: update pointers to foot segments and …
divyaksh-chander Feb 15, 2023
2ba19bf
WIP: GM foot mocap model. Intermediate commit. Model doesn't run
divyaksh-chander Feb 20, 2023
6538506
Initial commit 3 segment foot model
divyaksh-chander Feb 20, 2023
e6ec807
Rename files
divyaksh-chander Feb 21, 2023
4546c4f
Switch off muscles and include new midfoot file for development
divyaksh-chander Feb 21, 2023
0dd3cb6
Make new midfoot segment with constituent segments as AnyRefNodes.
divyaksh-chander Feb 21, 2023
1d809d7
include new toes file for development
divyaksh-chander Feb 21, 2023
661ccdb
Make new segments for toes with constituent segments as AnyRefNodes.
divyaksh-chander Feb 22, 2023
79ebe00
clean up of toes.any
divyaksh-chander Feb 22, 2023
93bfa6f
WIP: Remove unused DOFs from 3S foot model
divyaksh-chander Feb 23, 2023
4ab3c20
Remove individual foot segs and replace with pointers to lumped segs
divyaksh-chander Feb 23, 2023
b75742f
update ligament pointers to lumped segs and remove unused ligaments (…
divyaksh-chander Feb 23, 2023
840ffaa
Include muscles with updated pointers to lumped segs
divyaksh-chander Feb 23, 2023
81bb9aa
Start 3SFoot mocap model
divyaksh-chander Feb 24, 2023
d5d142e
Substitute simple foot with 3S foot, update force plate definition an…
divyaksh-chander Feb 24, 2023
bbaafe0
Add toe drivers for foot 3s mocap model
divyaksh-chander Feb 24, 2023
0139956
WIP: add calibration studies in 3S mocap model
divyaksh-chander Feb 27, 2023
2067e5a
Remove muscles acting on the same segment and remove them from activi…
divyaksh-chander Feb 27, 2023
5946aec
Completely comment out muscle activity constraints that linked unused…
divyaksh-chander Feb 27, 2023
d7b70c6
Comment out all muscle activity constraints
divyaksh-chander Feb 28, 2023
2831033
minor update marker protocol for 3S foot model
divyaksh-chander Feb 28, 2023
249da8e
Lumped mass and inertia for 3s foot model
divyaksh-chander Mar 1, 2023
46926ea
Foot GM restructure model tree muscles
divyaksh-chander Mar 3, 2023
4a1ce99
code cleanup: move all foot muscles code block in one location
divyaksh-chander Mar 3, 2023
bfedd63
code cleanup: move all 3S foot muscles code block in one location
divyaksh-chander Mar 3, 2023
7856b2f
Foot 3S restructure model tree muscles
divyaksh-chander Mar 3, 2023
822a74f
Merge branch 'master-ammr-2.5' into foot-model
divyaksh-chander Mar 6, 2023
4936cd5
Link toe drivers in foot 3s
divyaksh-chander Mar 8, 2023
1470337
start new example from Foot3S to work from GM foot folder
divyaksh-chander Mar 10, 2023
713f24b
Switch off muscles, use model from GM foot folder, add define stateme…
divyaksh-chander Mar 10, 2023
cd463eb
rename main file
divyaksh-chander Mar 10, 2023
e603b21
create file for Rigid Toe Flex Seg
divyaksh-chander Mar 10, 2023
35f2152
Add options to select foot model in foot root file
divyaksh-chander Mar 10, 2023
35789f1
fix rigid foot with toe flex seg file. create pointers for equivalent…
divyaksh-chander Mar 10, 2023
94ffacc
create new joint file for rigid foot with toe flex
divyaksh-chander Mar 10, 2023
e7ab67b
Create new seg nodes file
divyaksh-chander Mar 10, 2023
11a2e94
Remove seg related info from seg nodes
divyaksh-chander Mar 10, 2023
3727c85
Remove nodes info from seg file and include seg nodes file in the model
divyaksh-chander Mar 10, 2023
1b37922
include bone drawings as separate file
divyaksh-chander Mar 13, 2023
e4eeda6
Add dummy r0 and Axes0 variables in SegRigidToeFlex.any
divyaksh-chander Mar 14, 2023
e5c3e57
Create new rigid part toe flex files for joints, interface, and initi…
divyaksh-chander Mar 14, 2023
6dce3da
Remove joints, interfaces and initial positions not needed in Rigid s…
divyaksh-chander Mar 14, 2023
dfa80c6
include new muscle file for rigid foot with toe flex
divyaksh-chander Mar 14, 2023
4fcaa1b
Remove muscles within the rigid part and remove all muscle activity c…
divyaksh-chander Mar 14, 2023
bfa0a8f
Include new ligament files for rigid seg with toe flex
divyaksh-chander Mar 15, 2023
491c608
Remove ligaments within the rigid part.
divyaksh-chander Mar 15, 2023
2d08174
Link toes flexion extension in rigid foot with toe flex model
divyaksh-chander Mar 16, 2023
5bd8645
Clean-up of foot drivers file in Free posture rigid foot toe flex exa…
divyaksh-chander Mar 16, 2023
ab0f1d7
Clean up bone drawings: remove AnyString for surface folder
divyaksh-chander Mar 16, 2023
b963638
Use AnyInertiaMatrix to define mass properties of individual and lump…
divyaksh-chander Mar 17, 2023
d9da7f7
code clean-up: remove mass properties from seg files
divyaksh-chander Mar 20, 2023
39a52d3
Code cleanup: Make foot folder in root file and update all seg-relate…
divyaksh-chander Mar 21, 2023
80486c3
Start foot interface morphing
divyaksh-chander Mar 30, 2023
7dd054f
Implement interface morphing in GMfoot, remove GeomScale
divyaksh-chander Mar 30, 2023
da2d116
Implement interface morphing in RigidFoot with Toe Flex
divyaksh-chander Apr 12, 2023
26cbbc3
Merge branch 'master-ammr-2.5' into foot-model
divyaksh-chander Jun 14, 2023
ddf5762
Merge branch 'master-ammr-2.5' into foot-model
divyaksh-chander Jun 14, 2023
d7e3d25
update picked points and add option for _SCALING_NONE_
divyaksh-chander Jun 16, 2023
c5e02b6
fix interface morphing: remove reverse transformation and update talu…
divyaksh-chander Jun 20, 2023
437d46d
Merge branch 'master' into foot-model
divyaksh-chander Jul 12, 2023
c0314f9
create BM statement options for foot models
divyaksh-chander Jul 12, 2023
d95b4c5
update BM FOOT MODEL statements in GM foot include. Add reference to …
divyaksh-chander Jul 13, 2023
b4fc0f2
Add more points for RBF, fix scaling None, create T0 function in Foot…
divyaksh-chander Jul 13, 2023
d88e1c4
include GM foot models using BM Foot statement
divyaksh-chander Jul 13, 2023
ac408d4
Move TLEM subtalar and ankle joint definitions outside of the foot se…
divyaksh-chander Jul 18, 2023
01664f9
Remove GM Foot Mixin class template and implement changes into AMMR d…
divyaksh-chander Jul 18, 2023
440a805
WIP: Update scaling implementation: Interface morphing + Geom Scaling
divyaksh-chander Jul 18, 2023
e06d031
Remove GM foot ankle and subtalar joint, add anatomical frame and std…
divyaksh-chander Jul 19, 2023
5198934
BugFix GM foot mixin
divyaksh-chander Sep 11, 2023
5e3d809
WIP code cleanup
divyaksh-chander Jan 26, 2024
de49d97
Merge remote-tracking branch 'remotes/origin/master' into foot-model
divyaksh-chander Jan 26, 2024
fd22eab
Follow-up to merge of master: remove duplicate definitions of ankle a…
divyaksh-chander Jan 26, 2024
b331c0b
Multiply rotation about x with sign for left right foot
divyaksh-chander Jan 26, 2024
b32abc8
Refactor scaling: Move lines adding scaling function from seg file to…
divyaksh-chander Jan 29, 2024
f0aa5e8
Update to 3s foot mocap model. adjust names and links in the model
divyaksh-chander Jan 30, 2024
8259932
Remove extra drivers from toe drivers
divyaksh-chander Jan 30, 2024
273806a
Switch off reactions for linked toes driver
divyaksh-chander Jan 30, 2024
bdd9acc
improve initial guess of fdl control seg orientation
divyaksh-chander Feb 1, 2024
a96d6f7
Remove normed measure = off from anykinpointsurface
divyaksh-chander Feb 1, 2024
dda9aa6
use foot scaling function instead of only geom scale to scale NaviCun…
divyaksh-chander Feb 1, 2024
4e72d55
Copy Plug-in-gait simple to start the detailed foot mocap model
divyaksh-chander Feb 1, 2024
e74b82d
Add GM foot mocap model files to the model
divyaksh-chander Feb 1, 2024
bb57bd7
use gm foot mocap model files in the main and use the new BM statemen…
divyaksh-chander Feb 1, 2024
ed86abe
Update pointers to the foot in MarkerProtocolFoot.any and ForcePlates…
divyaksh-chander Feb 1, 2024
3bca2fc
Add extra lines in main file from GM foot mocap model main file
divyaksh-chander Feb 1, 2024
504c6ea
Update path to GM foot directory
divyaksh-chander Feb 1, 2024
31811b3
Remove line including GM foot model from main since BM statement incl…
divyaksh-chander Feb 1, 2024
29d86cf
update pointers to foot segment folder
divyaksh-chander Feb 1, 2024
a4dfbd8
update pointer to foot model joint folder
divyaksh-chander Feb 1, 2024
e737e3a
Attempt to fix Marker Protocol of detailed foot by using scale functi…
divyaksh-chander Feb 2, 2024
cc870c5
code cleanup: remove commented out lines from Ankle and Subtalar join…
divyaksh-chander Feb 2, 2024
1322503
refactor linked toes driver to include the measure inside the driver
divyaksh-chander Feb 2, 2024
669913d
Add toe flexion drivers through class template in ExtraDrivers.any.
divyaksh-chander Feb 5, 2024
e1e0527
Make xopy of bvh xsens model to start bvh xsens model with toe flex
divyaksh-chander Feb 7, 2024
a045bbb
update xsens bvh protocol to include ref frames for foot segments
divyaksh-chander Feb 7, 2024
570f384
update create foot nodes class template to include ref frames inside …
divyaksh-chander Feb 7, 2024
f6c9f72
add new nodes in gm foot model for mocap models.
divyaksh-chander Feb 7, 2024
4851ac7
Change ARel of MtPhal joint on Proximal Phalange 1 to orient the move…
divyaksh-chander Feb 7, 2024
e0ffe28
Adapt bvh xsens model for toe flexion
divyaksh-chander Feb 7, 2024
3e43a05
Add BM statement for foot model ligaments
divyaksh-chander Feb 12, 2024
a4818fb
Include joint muscles for toes and switch off foot model ligaments
divyaksh-chander Feb 12, 2024
c3c1c15
Switch off drawing of muscle control seg
divyaksh-chander Feb 12, 2024
319ddee
update interface morphing
divyaksh-chander Feb 15, 2024
8b3b079
Adjust GRF prediction height and remove weak subtalar eversion driver.
divyaksh-chander Feb 15, 2024
0eecd27
update path to mocap marker protocol
divyaksh-chander Feb 15, 2024
ee4d1ff
clean up c3d mocap model toe flexion: delete toe drivers file as it i…
divyaksh-chander Feb 15, 2024
d0f9bcb
add create video file for generating video showing detail of toe flex…
divyaksh-chander Feb 15, 2024
3d3a32a
Make WIP model of free posture gm foot with some work on shoe model
divyaksh-chander Feb 15, 2024
3c32ead
Rename toe flexion c3d model
divyaksh-chander Feb 15, 2024
6b71978
Code cleanup seg nodes
divyaksh-chander Feb 18, 2024
68d5a31
Rename joint muscles folder to JointMusclesFoot. This prevents errors…
divyaksh-chander Jun 11, 2024
5de0d4d
Refactor talus.ankle joint definition. Lateral and Medial control poi…
divyaksh-chander Jun 17, 2024
4698a1a
Import Lateral and medial control points from TLEM dataset to GM dataset
divyaksh-chander Jun 17, 2024
871a491
Add malleoli and malleoli midpoint in RBF transformation.
divyaksh-chander Jun 18, 2024
a0f4ef2
take reduced set of points for affine transformation in interface mor…
divyaksh-chander Jun 18, 2024
9a63074
Cleanup, remove ankle joint axis, bug fix sign of subtalar joint axis…
divyaksh-chander Jun 18, 2024
8f5d1b2
Refactor talus.anklejoint.arelunscaled since ankle joint axis is remo…
divyaksh-chander Jun 18, 2024
5625dda
Rename med and lat malleoli as Medial and Lateral Malleolus. They are…
divyaksh-chander Jun 18, 2024
489b856
WIP: update RotationPenetrationCombiDriver_template.any to include bo…
divyaksh-chander Jun 19, 2024
441ab36
Clean up of RotationPenetrationCombiDriver_template.any.
divyaksh-chander Jun 20, 2024
ab4dc30
Update Extra Drivers file in toe flex bvh example to demo updates to …
divyaksh-chander Jun 20, 2024
9ac44a0
fix typo in corner coordinates
divyaksh-chander Jun 20, 2024
9bf9f52
Update weights for drivers and functions in RotationPenetrationCombiD…
divyaksh-chander Jun 20, 2024
e754c39
Update RotationPenetrationCombiDriver_template.any to use smoothramp …
divyaksh-chander Jun 21, 2024
5a12195
Add documentation for RotationPenetrationCombiDriver_template.any
divyaksh-chander Jun 21, 2024
c092b3f
Add strength scaling factors to toe flexion joint actuator strength.
divyaksh-chander Jun 27, 2024
166699a
Create heel plantar, metatarsal 1,2,5 plantar nodes from existing sta…
divyaksh-chander Jun 28, 2024
53a9f0a
Extend selected outputs of leg model to include outputs also when foo…
divyaksh-chander Jul 1, 2024
204e1ad
Merge branch 'master' into foot-model
divyaksh-chander Jul 10, 2024
ef722c7
Add big toe node in model parameter
divyaksh-chander Jul 10, 2024
28e7bb6
Add switch for using infinite plane in RotationPenetrationCombiDriver…
divyaksh-chander Jul 18, 2024
a5a2040
Rename driver for toe flex in mocap inversedynamics
divyaksh-chander Jul 25, 2024
4c69e7a
Merge branch 'ammr4-beta' into foot-model-ammr4
divyaksh-chander Aug 5, 2024
2ef0b8a
Merge remote-tracking branch 'remotes/origin/ammr4-beta' into foot-mo…
divyaksh-chander Aug 5, 2024
4f66650
Merge branch 'ammr4-beta' into foot-model-ammr4
divyaksh-chander Oct 7, 2024
d79a7fb
Removing old muscle models from FootGM folder
Oct 8, 2024
0b025f4
bug fix
Oct 8, 2024
da9c7d1
New muscle models for foot muscles
Oct 8, 2024
ba75759
finger muscle models fix
Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.pyc
**/Output/*
!**/Output/.gitkeep
!Application/MocapExamples/Plug-in-gait_Simple_GMFoot/Output/LowerExtremity_BareFootWalk.anyset
Docs/_build/*
Docs/auto_examples/*
Documentation/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#include "../libdef.any"

/** ----------------------------------------------------------------------------
This model uses the full body model, i.e. most of the body parts available
in the AAUHuman part of the Body directory. The model is grounded at the
pelvis and the posture if the model is controlled through a mannequin.any
file by means of joint angles.

This application is a really good starting point for new applications
involving the entire body.

The model do not contain muscles and is only intended for running kinematic analysis

The model has several configurations which can be changed in the file "Config.any"

BodyModelSelection can be either "FullBodyModel" or "FullBodySRHand"
FullBodyModel is a fullbody model
FullBodyModelSRHand is a fullbody model with a detailed hand and shoulder rhythm

CONFIGURATION2 can be either "FreePostureStatic" or "FreePostureMove"
FreePostureStatic is a static model which do not move its joint angles are controlled in the "mannequin.any" file
FreePostureMove is a dynamic model controlled through angles which can be set in the "MannequinInterpolation.any" file


---------------------------------------------------------------------------- */
Main = {

// ----------------------------------------------------------
// Driver type settings
// ----------------------------------------------------------
#ifndef DriverSelection
#define DriverSelection "FreePostureStatic"
#endif

// ----------------------------------------------------------
// Body Model Configuration
// ----------------------------------------------------------
#include "Model/BodyModelConfiguration.any"
#define BM_FOOT_MODEL _FOOT_MODEL_NONE_
#define BM_JOINT_TYPE_ANKLE_RIGHT _JOINT_TYPE_USERDEFINED_
#define BM_JOINT_TYPE_ANKLE_LEFT _JOINT_TYPE_USERDEFINED_

// The Mannequin file specifies load-time positions for all the segments
// in the HumanModel. This is important for the model's ablity to resolve
// all the kinematic constraints when the model is analyzed.
// The mannequin file also drives those degrees of freedom of the human
// model that are not governed by problem-specific drivers at run time.

#if DriverSelection == "FreePostureStatic"
// use different initial positions for two configurations
#include "Model/Mannequin.any"
#else //#if DriverSelection == "FreePostureMove"
// use different initial positions for two configurations
#include "Model/MannequinInterpolation.any"
#endif

// Model of the human body to be used for the analysis
#include "<ANYBODY_PATH_BODY>/HumanModel.any"

#ifndef SimplifiedContactMH
#define SimplifiedContactMH
#endif
#include "<ANYBODY_PATH_BODY>/Foot3S/3S_foot_model.any"

// The actual model where all components are assembled
AnyFolder Model={
/// Body model without default drivers
AnyFolder &BodyModel=.HumanModel.BodyModel;
/// Reference to the mannequin folder (used by drivers)
AnyFolder &Mannequin =.HumanModel.Mannequin;

#include "Model/Environment.any"

/// Constraints and drivers
AnyFolder ModelEnvironmentConnection = {
#if DriverSelection == "FreePostureStatic"
#include "Model/JointsAndDriversConstant.any"
#else //#if DriverSelection == "FreePostureMove"
#include "Model/JointsAndDriversInterpolation.any"
#endif
};

};

AnyBodyStudy Study = {
AnyFolder &Model = .Model;
tEnd = 1.0;
Gravity = {0.0, -9.81, 0.0};

#if DriverSelection=="FreePostureStatic"
nStep = 1;
#endif

#if DriverSelection=="FreePostureMove"
nStep = 150;
#endif


}; // End of study

// Include an operation sequence to run all required steps of your application (see Operations tab)
#include "<ANYBODY_PATH_MODELUTILS>\Operations\RunAppSequence.any"

}; //Main

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#path __BM_PLUGIN_FILE__ "BodyModelConfiguration.any"
#define BM_CONFIG_PLUGIN __BM_PLUGIN_FILE__

// -----------------------------------------------------------------------------------
// The BodyModel configuration can be modified using BodyModel GUI plugin
// or by manually editing this file.
//
// Please see this this file for more information on the options:
// #path HTML_DOC "<AMMR_PATH_DOC>/bm_config/index.html"
// -----------------------------------------------------------------------------------

// The model is without muscles
#define BM_LEG_MUSCLES_RIGHT _MUSCLES_SIMPLE_
#define BM_LEG_MUSCLES_LEFT _MUSCLES_SIMPLE_

#define BM_ARM_MUSCLES_RIGHT OFF
#define BM_ARM_MUSCLES_LEFT OFF

#define BM_TRUNK_MUSCLES OFF


// Remove default drivers
#define BM_MANNEQUIN_DRIVER_DEFAULT OFF
#define BM_ARM_LEFT ON
#define BM_ARM_RIGHT ON
27 changes: 27 additions & 0 deletions Application/Examples/FreePosture3SFoot/Model/Config.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@


//FullBodyModel FullBodySRHand
#ifndef BodyModelSelection
#define BodyModelSelection "FullBodyModel"
#endif

//FreePostureStatic FreePostureMove
#ifndef DriverSelection
#define DriverSelection "FreePostureMove"
#endif



#define ERRORMSG (ErrorMessage) AnyMessage MISSING_SELECTION = { TriggerPreProcess = On; Type = MSG_ErrorFatal; Message = ErrorMessage; };

//Error messages to inform about selection possibilities
#if BodyModelSelection != "FullBodySRHand" & BodyModelSelection != "FullBodyModel"
ERRORMSG ("In Config.any please select BodyModelSelection to be either FullBodyModel or FullBodySRHand.")
#define MISSING_SELECTION
#endif

#if DriverSelection != "FreePostureMove" & DriverSelection != "FreePostureStatic"
ERRORMSG ("In Config.any please select DriverSelection to be either FreePostureMove or FreePostureStatic")
#define MISSING_SELECTION
#endif

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@


// ************************************
// Drivers for the left arm
// ************************************


#if BM_ARM_LEFT & (BM_ARM_SHOULDER_RHYTHM == OFF)
//Sterno clavicular joint driver
AnyKinEqSimpleDriver SCDriverLeft ={
AnyKinMeasure& ref1 =...BodyModel.Interface.Left.SternoClavicularProtraction;
AnyKinMeasure& ref2 =...BodyModel.Interface.Left.SternoClavicularElevation;
DriverPos = pi/180*{
.JntPos.Left.SternoClavicularProtraction,
.JntPos.Left.SternoClavicularElevation
};
DriverVel = pi/180*{
.JntVel.Left.SternoClavicularProtraction,
.JntVel.Left.SternoClavicularElevation
};
Reaction.Type={Off,Off};
};
#endif

//Glenohumeral joint
AnyKinEqSimpleDriver GHDriverLeft={
AnyKinMeasure& ref1 =...BodyModel.Interface.Left.GlenohumeralAbduction;
AnyKinMeasure& ref2 =...BodyModel.Interface.Left.GlenohumeralFlexion;
AnyKinMeasure& ref3 =...BodyModel.Interface.Left.GlenohumeralExternalRotation;

DriverPos=pi/180*{
.JntPos.Left.GlenohumeralAbduction, //GH joint
.JntPos.Left.GlenohumeralFlexion, //GH joint
.JntPos.Left.GlenohumeralExternalRotation //GH joint
};
DriverVel = pi/180*{
.JntVel.Left.GlenohumeralAbduction, //GH joint
.JntVel.Left.GlenohumeralFlexion, //GH joint
.JntVel.Left.GlenohumeralExternalRotation //GH joint
};
Reaction.Type={Off,Off,Off};
};

//Elbow flexion driver
AnyKinEqSimpleDriver ElbowFlexionDriverLeft={
AnyKinMeasureOrg &Elbow =...BodyModel.Interface.Left.ElbowFlexion;
DriverPos=pi/180*{.JntPos.Left.ElbowFlexion};
DriverVel = pi/180*{.JntVel.Left.ElbowFlexion};
Reaction.Type={Off};
};

//Elbow pronation driver
AnyKinEqSimpleDriver ElbowPronationDriverLeft={
AnyKinMeasure& Elbow =...BodyModel.Interface.Left.ElbowPronation;
DriverPos = pi/180*{.JntPos.Left.ElbowPronation };
DriverVel=pi/180*{.JntVel.Left.ElbowPronation };
Reaction.Type={Off};
};

//Wrist driver
AnyKinEqSimpleDriver WristDriverLeft ={
AnyKinMeasure& ref1 =...BodyModel.Interface.Left.WristFlexion;
AnyKinMeasure& ref2 =...BodyModel.Interface.Left.WristAbduction;
DriverPos = pi/180*{
.JntPos.Left.WristFlexion,
.JntPos.Left.WristAbduction
};

DriverVel = pi/180*{
.JntVel.Left.WristFlexion,
.JntVel.Left.WristAbduction};
Reaction.Type={Off,Off};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@


// ************************************
// Drivers for the left fingers
// ************************************

//finger1
AnyKinEqSimpleDriver CMC1FlexionL={
AnyKinMeasure& ref =.RefHM.Interface.Left.CMCFlexion;
DriverPos= {.JntPos.Right.Finger1.CMCFlexion}*pi/180;
DriverVel={0};
};

AnyKinEqSimpleDriver CMC1AbductionL={
AnyKinMeasure& ref =.RefHM.Interface.Left.CMCAbduction;
DriverPos={.JntPos.Right.Finger1.CMCDeviation}*pi/180;
DriverVel={0};
};



AnyKinEqSimpleDriver MCP1FlexionL={
AnyKinMeasure&ref= .RefHM.Interface.Left.MCPFlexion;
DriverPos={.JntPos.Right.Finger1.MCPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver MCP1AbductionL={
AnyKinMeasure&ref= .RefHM.Interface.Left.MCPAbduction;
DriverPos={.JntPos.Right.Finger1.MCPDeviation}*pi/180;
DriverVel={0};
};

AnyKinEqSimpleDriver DIP1L={
AnyKinMeasure&ref= .RefHM.Interface.Left.DIP;
DriverPos={.JntPos.Right.Finger1.DIPFlexion}*pi/180;
DriverVel={0};
};

// finger2
// AnyKinEqSimpleDriver CMC2={
// AnyUniversalJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger2.Jnt.CMC;
// DriverPos={0,0};
// DriverVel={0,0};
// };
AnyKinEqSimpleDriver MCP2L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger2.Jnt.MCP;
DriverPos={.JntPos.Left.Finger2.MCPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver PIP2L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger2.Jnt.PIP;
DriverPos={.JntPos.Left.Finger2.PIPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver DIP2L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger2.Jnt.DIP;
DriverPos={.JntPos.Left.Finger2.DIPFlexion}*pi/180;
DriverVel={0};
};



// finger3
// AnyKinEqSimpleDriver CMC3={
// AnyUniversalJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger3.Jnt.CMC;
// DriverPos={0,0};
// DriverVel={0,0};
// };
AnyKinEqSimpleDriver MCP3L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger3.Jnt.MCP;
DriverPos={.JntPos.Left.Finger3.MCPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver PIP3L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger3.Jnt.PIP;
DriverPos={.JntPos.Left.Finger3.PIPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver DIP3L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger3.Jnt.DIP;
DriverPos={.JntPos.Left.Finger3.DIPFlexion}*pi/180;
DriverVel={0};
};


//finger4
// AnyKinEqSimpleDriver CMC4={
// AnyUniversalJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger4.Jnt.CMC;
// DriverPos={0,0}*pi/180;
// DriverVel={0,0};
// };
AnyKinEqSimpleDriver MCP4L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger4.Jnt.MCP;
DriverPos={.JntPos.Left.Finger4.MCPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver PIP4L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger4.Jnt.PIP;
DriverPos={.JntPos.Left.Finger4.PIPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver DIP4L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger4.Jnt.DIP;
DriverPos={.JntPos.Left.Finger4.DIPFlexion}*pi/180;
DriverVel={0};
};


// finger5
// AnyKinEqSimpleDriver CMC5={
// AnyUniversalJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger5.Jnt.CMC;
// DriverPos={0,0};
// DriverVel={0,0};
// };
AnyKinEqSimpleDriver MCP5L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger5.Jnt.MCP;
DriverPos={.JntPos.Left.Finger5.MCPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver PIP5L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger5.Jnt.PIP;
DriverPos={.JntPos.Left.Finger5.PIPFlexion}*pi/180;
DriverVel={0};
};
AnyKinEqSimpleDriver DIP5L={
AnyRevoluteJoint &ref= .RefHM.Left.ShoulderArm.Seg.Hand.Finger5.Jnt.DIP;
DriverPos={.JntPos.Left.Finger5.DIPFlexion}*pi/180;
DriverVel={0};
};



Loading
Loading