I want to alter the code to specify right arm flexion (0-150°) in anybody. I tried to modify the code in “Joints and Drivers.any”(Fig.1) in “BergmannGH” application in anybody model repsitory many times, but there are always errors (Fig.2).
How should I modify the code to realize arm flextion movement? Could you help me and show what should I do?
Hi Tom
It seems like you’ve copy-pasted the fourier driver of the GHabduction.
Therefore you must also change the drivers’ name.
In your case it is still called “Abduction driver” instead of “flexion driver” or whatver you prefer.
Also try to simply write a 0.0 at the first position of the vector. This might help.
And make sure you don’t add any drivers without removing or uncommenting others.
Hope this helps.
The problem that you are seeing is caused by the constraint below:
// Keep the hand in the frontal plane
AnyKinEq HandConstraint = {
AnyKinLinear lin = {
AnyRefFrame &GHnode = Main.Model.HumanModel.Right.ShoulderArm.Seg.Scapula.gh;
AnyRefFrame &Hand = Main.Model.HumanModel.Right.ShoulderArm.Seg.Hand;
Ref = 0;
};
Reaction.Type = {Off};
MeasureOrganizer = {2};
};
This driver ensures that the arm stays in the frontal plane and, thus, conflicts with the flexion driver. To fix you need to remove this particular driver and add one for abduction (for example 10 degrees or so).
Here how it should look like:
// Abduction movement similar to Bergmann's experiment.
AnyKinEqFourierDriver FlexionDriverRight={
AnyKinMeasureOrg &ref1 =...HumanModel.Interface.Right.GlenohumeralFlexion;
Type = Sin;
Freq = 0.0625; // 0.1;
A = { {0.0, 90*pi/180} };
B = { {0.0, 0.0 } };
Reaction.Type = {Off};
};
// Abduction movement similar to Bergmann's experiment.
AnyKinEqSimpleDriver AbductionDriverRight={
AnyKinMeasureOrg &ref1 =...HumanModel.Interface.Right.GlenohumeralAbduction;
DriverPos ={10*pi/180};
DriverVel = {0};
Reaction.Type = {Off};
};
// Keep the hand in the frontal plane
// AnyKinEq HandConstraint = {
// AnyKinLinear lin = {
// AnyRefFrame &GHnode = Main.Model.HumanModel.Right.ShoulderArm.Seg.Scapula.gh;
// AnyRefFrame &Hand = Main.Model.HumanModel.Right.ShoulderArm.Seg.Hand;
// Ref = 0;
// };
// Reaction.Type = {Off};
// MeasureOrganizer = {2};
// };
Hi Pavel,
Thank you for your help too much. I used my own shoulder joint scaling humerus and scapula from CT data in Anybody V. 6.0.5. But there are some errors as figure shows. Thank you for your response.
Best regards,
Tom
Generally speaking it is a good idea to search forum for the error messages that you are getting. We do have most of the questions answered already. Your current problem is in the muscle wrapping - it seems that the wrapping surfaces are not correct for these muscles. Please try to visualize and see what can be done about that. It is also possible to change settings of the muscle element to make it solve the problem. Please refer to the reference manual to see options.