Create New Marker Set from GaitFullBody

Hi, Sir,

I have some questions about creating my own marker set. My motion is ingress. My version is 4.1.0

I already have adjusted the “MarkerLabels” to fit my own marker set (33 markers)
all “CreateMarker Mx” to fit my own marker set and OptX,Y,Z all “On”
all “sRelOpt” to {0,0,0}
Mannequin.any almost fit the initial position but maybe no enough good.

Does “sRelOpt” need to adjust to every markers’ initial position at the first frame?
The coordinate of every marker at the first frame can be given in the c3d file.

A marker, C7, disappeared until the 463th frame (total: 1105 frames),
can it be a driver marker? Or should I don’t consider it being a driver marker?

What affect do OptX,Y,Z have? (On or Off)

Finally, I can load the model, and when I run the “Operation: Main.RunMotionAndParameterOptimizationSequence”, it stop at
ERROR(OBJ.MCH.KIN3) : C:/D…s/T…n/M…s/A…1/A…n/M…l/G…y/GaitFullBody.main.any : MotionOptimization.InitialConditions : Kinematic analysis failed in time step 0

Could you give me some suggestions?

Thank you so much.

Hi, Sir,

The other questions.

I comment anyscipt in CreateMarkerClass.any,
“AnyParamFun &ref2 = Main.ModelSetup.C3DFileData.Points.Markers.MarkerName.PosInterpol;”
in the before article, so I can load successful.

But I think it’s not good for me. Then, I uncommented it again, and an error appears,
ERROR(SCR.PRS9) : C:/D…s/T…n/M…s/A…1/A…n/M…l/G…y/ModelSetup.any : Defined At : C:/D…s/T…n/M…s/A…1/A…n/M…l/G…y/CreateMarkerClass.any : ‘PosInterpol’ : Unresolved object

I already had read the similar thread, http://forum.anyscript.org/showthread.php?t=2470, but I cannot solve it, and I have made sure my MarkerLabels & MarkerFolder in the ModelSetup.any

Thank you for your help.

Best Regards
Andy

Hi Andy,

The sRelOpt should not be all set to {0,0,0}. They have to contain the coordinate of the marker on the local segment coordinate system. Please refer to the following thread http://forum.anyscript.org/showthread.php?t=2477

If a marker if disapearing or dropping for a large amount of frame then it is not usable and should be excluded. Otherwise it may cause the kinematic to fail.

As for OptX, Y, Z it controls the fact that the marker location will be optimized (On) or not (Off) in the selected direction x, y or z. Not all the marker should be optimized and not necesarily in all three direcons either. Markers on clear bony landmark or extremities are usualy not optimized whereas markers in the middle of a bone (less accurate placement) are. This as to be done carefully, it is a quite important step of the optimization.

Best regards, Sylvain.

Hi Andy,

About the unresolved PosInterpol function, you just have one of the marker name misspelled in the ModelSetup file. You wrote RSLACc instead of SLACc.

Best regards, Sylvain.

Thank you, Sylvain.
I had solved this error:)

Hi, Sir,
How do I fix the error?
Please see attach files, a “error.jpg” in the *.zip.
It happened that I do RunMotionAndParameterOptimizationSequence, and software shut down when Kinematic analysis completed.

My software is version 4.1 demo license, OS is XP sp3.
Thank you for your help.

Hi,

Please try to update your version of AMS with the last 4.1.1, i could run the model without problem with it.

Best regards, Sylvain.

Hi,

The other questions.

If I want to do kinematics analysis to get joint angle of Knee, and inverse dynamics analysis to get muscle activity of lower limb.
Do I separately run “RunMotionAndParameterOptimizationSequence” & “InverseDynamicModel” to get kinematics data and muscle activity data?

Thank you.

Hi Andy,

As it is on the gait models the MotionAndParameterOptimizationSequence and the InverseDynamicAnalysisSequence have to be runned separately.

However the MotionAndParameterOptimizationSequence only need to be runned once. After that the optimised motion is saved. And when you run the InverseDynamicAnalysisSequence to get the muscle activity you can also access the kinematic data for the joint angles.
As the InverseDynamic makes use of the Kinematic, all the kinematic data is available.
So you can just run the InverseDynamicAnalysisSequence and get all the outputs at once.

Best regards, Sylvain.

Hi, Sir,

I already have run “MotionAndParameterOptimizationSequence” well.

Then, I want to run the InverseDynamicAnalysisSequence.

But I have some error.
One,
ERROR(OBJ1) : C:/D…s/T…n/M…s/A…s/A…1/Body/A…n/L…D/Mus.any : IliacusMid3.SPLine : Number of allowed iterations for contact solution has been exceeded in Main.Studies.HumanModel.BodyModel.Right.Leg.Mus.IliacusMid3.SPLine

What can I do to fix the error?

The other thing, when I closed the muscle, the model can run several steps of inverse dynamic analysis, but it stopped at
ERROR(OBJ.LIB.OOS1) : C:/D…s/T…n/M…s/A…s/A…1/Body/A…n/L…D/Mus.any : IliacusLateralis1.SPLine : Unexpected exception in the library OOSol :
OOSol exception : MISSING MESSAGE.

My model have some environments but I don’t set the interaction between model and environments, and I don’t use the force plate in experiment (c3d data).
Do I need to set the simulated contact force to do inverse dynamic analysis well when model contacts the environments?

Thank you so much

Hi Andy,
the muscle problem could be related to a wrapping problem. An increase in the SPLine.StringMesh could help. But in general, you have to include force boundary conditions with the environment, otherwise you will not be able to do reasonable inverse dynamic analysis.
Best regards,
Sebastian

Hi, Sir,
If I have a c3d data with force plate data.
Could the error or bug of inverse dynamic analysis be fixed easily?

Besides, what way do I set the force boundary conditions with the environment except the force plate?
Or, only adding force plate could be a force boundary condition?

Thank you for your reply.

Hi,

The force plate is a boundary condition as it provides the measured ground reaction forces to the model. So it is enough if the subject is not in contact with anything else than the plates.

If the subject interacts with another mechanical object (wall, chair, handle, etc…) this mechanical element should be added in the simulation.

Best regards, Sylvain.

Hi, Sylvain,

I know that is good boundary condition by using force plate.

And, if the subject interact with mechanical objects, I only add the elements or objects into the “environment.any” in the simulation, right?

Or, do I need to set the state of interaction between subject and objects, like contact of time or the other something?

The other questions,

what procedure can I do if I want have a validation between real EMG signal with simulated EMG?
I already put a c3d file to driving model, and finished some inverse dynamic analysis,
what muscle simulated data is it similar with real EMG, Fm or CorrectedActivity?

What characteristic value of simulated EMG can I do in comparison?
peak value, mean value or length of activity time, etc?

And what is the normalization tips of the simulated EMG?

What methods or procedure do you use in model validation?

Thank you so much.

Best regards, Andy.

Hi Andy,

Usually we have define the object the subject is interacting with in the environment.any file. There are basically two types measured such as force plates and boundary conditions that the subject may use to reduce the muscle loads.

The boundary conditions could be a hand attached using a spherical joint to a handle, a normal force coupled with friction there are many ways to do this. In the repository there are many different examples on this, but in common for this type is that they are determined by the muscle recruitment algorithm it will use them to reduce the load the muscles will carry.

There is no model quantity that directly corresponds to measured EMG, this is very difficult to calculate. Usually we normalize Activity and EMG to unity and plot the curves together.

This procedure makes it possible to compare is the muscles are active at the same time.

Best regards
Søren

Dear all

The first, thank you for your help.

I have other questions.

  1. Could I load marker data and force plate separately in the related files, such as EnvironmentAutoDetection.any, TrialSpecificData.any or modelsetup.any?
    Because analyzer of our lab motion capture system that is can not export markers data and force plate data together to c3d file when the rawdata of markers had labeled, filled, smoothing.
    I think that is a bug for the software of mocap analyzer, so I need to try the other way to input force plate data to do inverse dynamic.

  2. Why do the skull, spine and thorax rotate a constant degree/sec when my ingress model run kinematic analysis in RunMotionAndParameterOptimization in AMS4.2 and AMMR1.2?
    But, before I used AMS4.1 and AMMR1.1 buliding model that status had not happened.

  3. Now, in AMS, there is only a way to do inverse dynamic by driving the model with joint angle or markers data (the tenet still is calculated the joint angle, right?)
    I want to simulate the lower limb motion that like a four-bar linkage, input trajectories of two end joint , and the middle joints (one point with one DOF, flexion) will have a regular trajectories. Could the AMS do it?

  4. Is there any software can predict or generate the joint angle change in multi-linkage with 3-D that I can input some drivers? So, I can input the results to the AMS.
    I want to do a simulation to find the best initial contact position of right foot with ingress motion, I will set a constraint condition of right foot contact position in 1-D range, when the right foot contact the different position that will have change of lower limb joint angle, and do a optimization if the contact position that cause the lower muscle force an muscle activity in lower limb muscles (TA, VL, RF, GL etc.).

  5. Back to the environment setting, when I set the elements with cad file in environment, do I make some setting or constraint condition if the model contact the elements like the real status in experiment. I know the force plate can give a contact force, but the other elements cannot measure the contact force so that it may affect the results of inverse dynamic, right?

Thank you.

Best regards
Andy

Hi Andy,

Here are some answers to your questions:

1: yes this should be possible if you have two separate files one containing the markers and another one containing the forplate data these could both be loaded using the AnyInputc3d object. In then enviroment file you then need to point at the c3d file containing the force plate data then. You need to make sure the data is correctly synchronized… otherwise this will have to be done in the script.

2: This sounds as you have the upper body driven by some extra drivers and not only by markers? please have a look in the JointAndDriver.any fiel and see if you have extra drivers defined. There should be no difference between the kinematics of 4.1 and 4.2

3: I am not sure i fully understand the mechanism, but in general if the kinematics is defined the model should be able to run but if there are dof in the model which are undetermined because no driver or constraint is controlling them, then it will not work. So let suppose you had minimum three marker drivers on Pelvis and three on the foot then it would not be enough because the leg could tilt sideways due to the spherical joint in the hip and the two dof in the ankle, so in the that case you would need to lock the inversion/eversion dof in the ankle by a driver or add a marker driver on the knee.

4: If understand you correctly then in this case you want the entire body except the right leg to be controlled by the markers. The right leg you would like to control separately?. This is possible simply remove all marker drivers on the right leg and replace these with for example joint angle divers or other type of constraints that control the leg.

5: If the task performed in the experiment involved contact to objects and the forces was not measured for these then you will need to generate these boundary conditions in the model in terms of a spherical joint for eaxmple or an AnyReacForce. Then the model will calculate the force.

Best regards
Søren

Thank you, Søren.

  1. What place can I input the two files (one has markers data, another has force plate data)?
    Load two files (name) in the TrialSpecificData.any, right? And point at the c3d file that included the force plate data in EnvironmentAutoDetection.any. If the Acquisition rates of mocap and force plate are different, mocap is 250Hz, Force plate is 1000Hz, am I need to set a scale factor to synchronize, right? how to do the setting?
    I had used the GaitLowerExtremity being my base, and already run the inverse dynamic successful, but I only load the markers data driving the model.

  2. Could you give a example code for the setting contact constraints?
    For example, if the motion has 5 sec, and the model sit down at first sec end (the buttock contact the chair). What place can I input the constraints?

2-4. I need some time to ponder about the answers that you give.

Thank you again.

Best regards
Andy

Hi Andy

The extra file could be included in the ModelSetup.any file

The c3d usually contains a variable names NoAnalogSamplesPer3DFrame this quantity is used by the predefined forceplates. If you have two separate files i guess this number is not present or set to zero, so you will probably need to manually enter this into the forceplates classes, to make it right.

If the two c3d files are not synchronized from the measurements you will need to ensure this manully this would have to be done by altering the time array in the forceplate class definition.

Concerning the contact definition the best model to look at is the PedalDemoConditional it has a distance controlled contact definition.
When the pedal is close enough to the foot there can be a contact. Please look in the JointAndDrivers.any file i think the contact object is defined there.

Best regards
Søren

Hi, Søren,

If my model already had the kinematic constraints by mocap data.
Additional ,I only want to the contact definition when foot contacts the ground and the platform and buttock contacts the chair in platform.
I already try to understand the PedalDemoConditional model and read chapters in Building block tutorial, but apparently, I can’t understand the key points to add the contact definitions in my model. :frowning:

Could you help me to add the anyone contact definition in my model?
I think that just adding only one contact definition would be enough for me.
If you could help me, please maybe add a virtual force plate.
The Attach File already can run inverse dynamic analysis without any boundary conditions with connecting model, but I build some elements in the environment that you can understand what contact positions it happen.

I appreciate your help. Thank you very much.

Best regards,
Andy