Initial conditions measurement for setting another initial condition

Hi all,
I am afraid it’s going to be a complicated message, I apologize in advance…

I am “playing” with AMMR_Thorax_beta, which is the AMMR with articulated thorax.

For my purposes, I need to get some measurements after having run initial conditions, for example the position of a particular segment, and then I need to re-use these measurement to adjust the position of other segments to get a new initial condition which will be the starting point for running the inverse dynamics (I hope it’s clear).

Since I have to reproduce these steps for many cases, I would like to avoid the multiple re-running and the manually operation to take measurements and to modify all the required anyfiles.

Is there, then, a way to prevent all of this?
Could I create, for example, a second study that uses the measurements taken from the first running of ICs to set second ICs?

Yes, 2 studies would be good. And check ref. manual for AnySetValueOperation to see how to transfer values from one study to another.

Kind regards, Pavel

Thank you a lot for your time

Kind regards,
Noemi

Hi Pavel,
I tried to impose a second study in the main file, as in the following code:

AnyBodyStudy Study2 = {

AnyOperationSetValue SetValue = {

Target = {
  &Main.HumanModel.BodyModel.Trunk.SegmentsThorax.T12Seg.T12_orientation,
  &Main.HumanModel.BodyModel.Trunk.SegmentsThorax.T12Seg.sdR_traslation
};

Source = {
  &Main.Study.AdditionalMeasures.T12_rotation,
  &Main.Study.AdditionalMeasures.T12_traslation
};   

};

AnyFolder &Model = .Model;

tEnd = 2.5;
Gravity = {0.0, -9.81, 0.0};
nStep = 5;

InitialConditions.SolverType = KinSolOverDeterminate;
Kinematics.SolverType = InitialConditions.SolverType;

};

where source contains the measures I want to use and target the destination, but actually in T12_orientation (from target), after running Study2.InitialConditions, there are not the new values… it seems that it doesn’t import them at all.
I even tried by typing some numbers, instead of importing that from the Measurement file, as in the following:
AnyBodyStudy Study2 = {

AnyOperationSetValue SetValue = {

AnyVec3 NewMass = {10, 10, 10};

Target = {
  &Main.HumanModel.BodyModel.Trunk.SegmentsThorax.T12Seg.T12_orientation
};

Source = {
        &NewMass
  };    

};

AnyFolder &Model = .Model;

tEnd = 2.5;
Gravity = {0.0, -9.81, 0.0};
nStep = 5;


InitialConditions.SolverType = KinSolOverDeterminate;
Kinematics.SolverType = InitialConditions.SolverType;

};

but it still doesn’t work.
What should I do?

Kind regards,
Noemi

I figured out why it was not working, but now an error message appears, which states:

‘SetValue’ operation on this value-object is not allowed.

The object in question is an AnyVec3 one, defined at the beginning of the file Buckle.any.
I checked in the ref manual and the operation AnyOperationSetValue set the value of AnyValue-objects, which should be the same as AnyVec3.
What do you think it might be the problem?

Ps I am using AMMR_Thorax_beta model

Thanks for your help,
Noemi

I found out the solution!

Thank you again!!
Noemi

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.