Disabling muscles in Anybody model

Hello, I am trying to modify the MoCap_LowerBody model to remove some muscles. For example, I know I can disable a muscle using MechObjectExclude, but I’m not sure how to edit the script to do so. I was told I could do so by editing the InverseDynamicStudy so I attempted the following:

AnyBodyStudy InverseDynamicStudy = {
AnyFolder &C3DData=…ModelSetup.C3DFileData ;
AnyFolder &BodyModel=.HumanModel.BodyModel;
#include “Mannequin.any” //**// Usually no need to make changes
MechObjectExclude = ObjSearch(“Main.Studies.HumanModel.BodyModel.Trunk.MusclesSpine.Transversus.TransversusL1”,“AnyMechObject”);

AnyFolder &EnvironmentModel = Main.EnvironmentModel;
AnyFolder ModelEnvironmentConnection = {
#include “JointsAndDriversOptimized.any” //**// Usually no need to make changes
};

In order to try to exclude the L1 transversus (bold is for emphasis). This creates an error:

ERROR(OBJ.MCH.MUS4) : C:/P…s/A…y/A…0/AMMR/A…n/E…s/M…w/M…l/InverseDynamics.any(29) : InverseDynamicStudy.InverseDynamics : Muscle recruitment solver : solver aborted after maximum number of line-search iterations

I’m new to Anybody and I don’t understand the script very well yet. This error makes it seem like the issue is that the model cannot resolve without the transversusL1, but I want to be sure that I’m doing this correctly. Am I removing muscles correctly? or should the object exclusion line be placed somewhere else within the script?

Hi Pablo,

Your code seems is correct.

Due to the way the abdominal pressure is defined i think the model may have difficulties to solve without this muscles.

This error means that there was no way the solver was able to balance all dof in the model.

Could you elaborate more on what you are trying to achieve? there might be several ways to obtain this.

If you wan to exclude more muscles, please have a look at the AnyBodyStudy object in the manual, look in the bottom of the page, here you will find a small example excluding several muscles.

Best regards
Søren

I’m trying to compare a custom EMG model for lumbar loading with Anybody. The EMG model is very simple, only including a few muscles (Erector Spinae, Rectus Abdominus, etc) so comparing it to the full Anybody model wouldn’t be appropriate.

One more thing, how do I exclude multiple muscles? The following:

AnyBodyStudy InverseDynamicStudy = {
AnyFolder &C3DData=…ModelSetup.C3DFileData ;
AnyFolder &BodyModel=.HumanModel.BodyModel;
#include “Mannequin.any” //**// Usually no need to make changes
MechObjectExclude = ObjSearch(“Main.Studies.HumanModel.BodyModel.Trunk.MusclesSpineRight.ObliquusInternus.OICI_C10”,“AnyMechObject”),
ObjSearch(“Main.Studies.HumanModel.BodyModel.Trunk.MusclesSpineLeft.ObliquusInternus.OICI_C10”,“AnyMechObject”);

AnyFolder &EnvironmentModel = Main.EnvironmentModel;
AnyFolder ModelEnvironmentConnection = {
#include “JointsAndDriversOptimized.any” //**// Usually no need to make changes
};

Results in an error " ‘,’ unexpected, but this seems to be how it should be done according to the syntax from the lessons. I’m clearly misunderstanding something.

Sorry for all the trouble.

Hi Pablo,

You are using 2 ObjSearch functions that return pointer arrays. You need to concatenate them to equate to MechObjectExclude:

MechObjectExclude= arrcat(ObjSearch(..),ObjSearch(..));

Regards, Pavel