Hi Hans,
I am sorry, this is actually not possible. This value will be computed earlier than evaluation of the kinematic measure.
Why do you try to create ISBNodeAnalyse?
Regards,
Pavel
Hi Hans,
I am sorry, this is actually not possible. This value will be computed earlier than evaluation of the kinematic measure.
Why do you try to create ISBNodeAnalyse?
Regards,
Pavel
Hello,
Because the other independent software tool uses this node to make a reference frame with an entity matrix.
Best regards,
Hans
What do they do with this node?
As you said before you need to measure rotations, displacements - you don’t need to create a node for that in AnyBody.
Hello,
With this node the segment poisitions of the feet and the joint angles will be measured. That’s why I created this node.
Best regards,
Hans
Let me suggest how to compute what you want:
AnyVar x = HeelNode.r[0]; - should be sufficient for that.
AnyVar y = HeelNode.r[1];
AnyVar z = HeelNode.r[2];
a) HeelNode.r contains the translation in the global reference frame.
b) You can create AnyKinLinear between HeelNode and GlobalRef - that will also compute the same thing.
AnyKinRotational angles ={
Type=RotAxesAngles;
Axis1 = z;
Axis2 = x;
Axis3 = y;
AnyRefFrame &rf1 = FootSegmentHere;
AnyRefFrame &rf2 = Main.GlobalRef;
};
AnyVar alpha = angles.Pos[0];
AnyVar beta = angles.Pos[1];
AnyVar gamma = angles.Pos[2];
x,y,z, alpha, beta, gamma - should be the values you are looking for. Isn’t that it?
Regards,
Pavel
Hello,
For the first part the aswer is yes but for the segcond part not. The reference frame in the ISBNODe it has to be parallel to the global reference frame if the subject is standing in a static trial. I can generate the rotations in p1, p2 and p3 by using the AnyKind rotational method to generate and identity matrix at each timestep. I only was wondering if it was possible to generate a variable that could change over time because there are small movements of the subject at the static trial that affect the rotation.
Best regards,
Hans
Hans,
I get a little bit confused by your explanation - do you want your measurements in the global reference frame? or the reference frame rotated by initial conditions values? In the first case my solution will work, in the second case you do everything fine with p1, p2, p3.
From your words I understand that you want your reference frame to be adjusted to be parallel with the global ref. frame all the time. If you do so - all the measured angles will be equal to the ones measured from the global ref. frame (so no point in making life complicated). If you want to measure angles with respect to initial conditions - then you have your solutions.
I will try to guess as I cannot see it very clear from your posts - you have more than 1 inputs to the model and you run static trial first for each of them, and want automatically find the angles at the IC step, then adjust global axes to this position.
The problem here is that these angles will not be ready for the loading of the whole model. The model is loaded at once, not by parts - needs all the values to be ready.
Regards,
Pavel
Hello,
Tank you for your reply, but I will try to make it more clearly about the static and dynamic trial for my model. The static and dynamic trial will be loaded separe from each other and in order to make the features of the model equal to that other software tool I loud in the stati trial first. Then after everything is adjusted properly I load in the dynamic trial, but for now I have everything I need to make the axes in the nodes in the thorax, pelvis and feet equal to the global reference frame.
I hope this makes it more clear to you,
Hans
Yes, now it is clear.
Indeed, you will have to run a static trial first, output the rotation values, load a second study with these values, and run it. Best of luck.
Regards,
Pavel
Hello,
I use this optimization problem to minimize the deviation between the Local reference frame in the right foot and the global reference frame:
[SIZE=3]AnyOptStudy[/SIZE] RefOptimization =
{
Analysis =
{
[SIZE=3]AnyOperation[/SIZE] &Studyref = Main.Studies.KinematicStudyForParameterIdentification.Kinematics;
};
[SIZE=3]
[/SIZE][SIZE=3]AnyDesVar[/SIZE] p1={
Val=Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Foot.p1;
Min=-pi;
Max=pi;
};
[SIZE=3]AnyDesVar[/SIZE][SIZE=3] [/SIZE]p2={
[SIZE=3][/SIZE]Val=Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Foot.p2;
[SIZE=3][/SIZE]Min=-1;
[SIZE=3][/SIZE]Max=1;
[SIZE=3][/SIZE]};
[SIZE=3][/SIZE][SIZE=3]AnyDesVar[/SIZE][SIZE=3] [/SIZE]p3={
[SIZE=3][/SIZE]Val=Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.Leg.Seg.Foot.p3;
[SIZE=3][/SIZE]Min=-1;
[SIZE=3][/SIZE]Max=1;
[SIZE=3][/SIZE]};[SIZE=3]
[/SIZE][SIZE=3] [/SIZE][SIZE=3]AnyDesMeasure[/SIZE] FootRot = {
Val= sum(Main.Studies.KinematicStudyForParameterIdentification.Rot.Val);
Type=ObjectiveFun;
[SIZE=3]
[/SIZE]};
It will run the optimization step but the design measure only takes the last value of the rotation but not the sum of it. Why is this?
Best regards,
Hans
Hello,
I have found the solution for the problem now it works properly. I realized that I had to do this:
[SIZE=3]AnyDesMeasure[/SIZE] FootRot = {
Val= sum(Main.Studies.KinematicStudyForParameterIdentification.Rot());
Type=ObjectiveFun;
};
Now it works.
Best regards,
Hans