UpperLimb model strange movement of scapula

Hi there,

I'm working on an upperlimb model (with oly one arm) and I'm interested in the kinematic of the shoulder/glenohumeral/elbow joint. We have the c3d data of a simple movement (drink from a cup). Running the inverse dynamics, the sapula does a strange movement at that time the shoulderflexion angle is greatest. That results in strange angles of the glenohumeraljoint (60° adduction, 90° external rotation). I really don't know, how I should fix this problem.
Because of only one marker cluster (of four markers) on the sternum/thorax and no others, the soft drivers for Pelvis and Skull are on. The rest of the markers are on the upper- and forearm, elbow and wrist.

Can anyone give me some advise oder help?

Thanks!

Kind regards,
Lisa

Hi Lisa,

Are you using the shoulder rhythm.

Best regards
Søren

Hi Søren,

Yes, I'm using the shoulder rhythm.

Kind regards,
Lisa

so, do you have another suggestion?

Thanks and best regards,
Lisa

Hi @Liiisaa

Is the strange posture happening from one frame to another or is it smoothing in to it?
Try turning the shoulder rhythm off an see what it looks like.

If that does not help you can try using limits on the range of motion for the external rotation and adduction.

Best regards,
Bjørn
AnyBody Technology

Hi Bjørn,

thanks for your reply. The big shoulder movement is more smoothing in to it than happening from one frame to another. See the curve of the glenohumeral external rotation below.

grafik

After turning the shoulder rhythm off, nothing has changed...

I will try using limits for the range of motion, but that wouldn't really help because then I only "stop" the motion at a certain angle but don't know the "real" movement, or?

Best regards;
Lisa

Hi @Liiisaa

Okay, that seems a bit strange yes.
The limits should help you to keep within normal range of motion for the different joint motions.
Have you checked your motion capture data to see if any markers are swapping?

Best regards,
Bjørn

Hi Bjørn,

I've checked the motion capture data. There are no markers swapping or have a strange movement...

Best regards,
Lisa

Okay, is it possible for you to zip a copy of the model for me ?
that way i can try and debug it.
If so, please remove any personal or sensitive information from the code.

Best regards,
Bjørn

I've sent you a private message with the zip file.

Thanks and best regards;
Lisa

Hi @Liiisaa

I have looked at the model you sent me now.
First some general pointers on the model structure.

You sent me a whole ammr which indicate that you have begun modifying ammr files.
We generally consider this bad practice since changes will affect the rest of your ammr models.
A good idea is to make a copy of the model you would like to modify - in your case the Plug-in-gait-Simple folder. Essentially I did not know which model to debug - but i hope it was the plug-in-simple. It seemed modified. Then you can keep all needed modifications to that copy and don't risk potential bugs in other models.

Some things I needed to do before running your model - you can decide if I did something unintended.

  • i had to change the libdef including since you have multiple placed at different directory levels that creates an error when loading the model.
  • i had to change the C3D_FILE_NAME since the mentioned file was not present.
  • i changed the FirstFrame and LastFrame and MOCAP_C3D_DATA_PATH.
  • you had not included any markers to match you c3d file so i included the MarkerProtocol.any but i am unsure if those markers are correct.

I noticed that:

  • you do not have any constraints on the pelvis so the whole model is drifting in space as the simulation runs.
  • your markertracking does not seem too accurate. You should try and alter which marker positions are optimized and which are locked.
  • remember to run the parameter optimization when changing variables that are optimized by it.
  • I do not see the same strange scapula motions as you posted in this thread.

I hope the above can help you forward, otherwise feel free to ask again.

Best regards,
Bjørn

Hi Bjørn,

first of all, thanks for the answer.
Sorry for the circumstances...Next time I will only send you the PlugIn Gait Simple folder.
I think you run the wrong model..sorry for that. It's in the input folder - P002 - 3.0 and the "UpperLim.P002.any. That structure is for me easier beacuse later we run more individual c3d files with the same model, but markerProtocol, subject specific ddata and trial specific data will change every time.

So now, I hope you could run the right model. If not, then you have to ask again.

Best regards
Lisa

Yeah I definitely ran the wrong one then.

Many of the same comments I had are also present in this one.
Your model is drifting around in space since the pelvis is not locked in any position.
You also have to look at what default mannequin drivers are enabled.
The model currently does not allow flexion of the upper body, so it does not really follow the sternum markers you have.

Best regards,
Bjørn

So I have to lock the pelvis in one position? How do I have to do that?
The Drivers fot the Neck, Skull and Pelvis are on because there are no markers. The drivers for glenohumeral and elbow movements are off, because they are driven by markers.
In addition I have PelvisThoraxDriver and SkullThoraxDriver to prevent the model from moving around. But that doensn't really help? Or what do I have to change in the driver options?

Best regards
Lisa

Yes. If you do not lock the pelvis (you can turn the mannequin driver CType to Hard) then the pelvis will be free to move during the simulation, and I guess that is not the intention?
Yes, you have enabled the DefaultMannequin drivers, but their constraint type is by default set to Soft, so for the pelvis you can change that to hard.
Yes, you have the PelvisThoraxDriver and SkullThoraxDriver but those only lock the movement between pelvis/thorax and skull/thorax. Not between pelvis and ground.

If you want to use the sternum markers you have, then you can disable the drivers constraining the thorax flexion (possibly also rotation - but you can try that out) since that should be done by the markers.

The default mannequin drivers include a driver to use between pelvis and ground (i.e. when the legs are switched off). There is one for the linear translations and for the rotations.

Try and add something like:

Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosX.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosX.Reaction.Type = On;

for all translations and rotations in x,y,z directions. That is essentially constraining all degree of freedom for the pelvis and adding a reaction force in all directions.

Best regards,
Bjørn

Thanks for the answer.

I tried to add the constraints for the Pelvis.

Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosX.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosX.Reaction.Type = On;
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotX.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotX.Reaction.Type = On;

Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosY.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosY.Reaction.Type = On;
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotY.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotY.Reaction.Type = On;

Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosZ.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverPosZ.Reaction.Type = On;
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotZ.CType= {Hard};
Main.HumanModel.DefaultMannequinDrivers.PelvisGroundDriverRotZ.Reaction.Type = On;

But when I want to run the ParamterIdentification the Kinematic analysis failed in time step 0. I think now the model is overconstrained?!

Best regards
Lisa

You might be right.
Check what other default mannequin drivers and self made drivers you have enabled. Avoid having two drivers specify the same degree of freedom.

Best regards,
Bjørn

I only added the PelvisGroundDriver. This driver is only in the folder of the "Body"(BodyModel.MannequinDrivers.ClassTemplates.any). So am I right that I don't have this driver twice? I don't understand why I now have the problem of an overconstrained model...Sorry for that, but I really don't get it :frowning:

that doesn't work, because then the thorax is moving and tlting to the side.

Hi @Liiisaa

In this folder Main.HumanModel.DefaultMannequinDrivers you can see which default mannequin drivers you have enabled. If you have both

  #define BM_MANNEQUIN_DRIVER_PELVIS_THORAX_LATERAL_BENDING ON
  #define BM_MANNEQUIN_DRIVER_PELVIS_THORAX_ROTATION ON
  #define BM_MANNEQUIN_DRIVER_PELVIS_THORAX_EXTENSION ON

and your PelvisThoraxDriver driver then you are essentially overwriting the default mannequin drivers with Hard constraints on the measures. Like you did with the PelvisGroundDriver, Hence why I said it can get confusing when specifying multiple drivers on the same measure.

If you don't want to use your sternum drivers then you should try and exclude them. From their trajectories it seem that your motion contains some movement of the thorax - which is why I think you should try and remove the constraints on the thorax flexion, rotation and possibly bending. Otherwise you have to modify the posture and possibly create new drivers to accommodate the movement of the arm. I am not sure you can get a good motion when locking the thorax from moving - which is what your PelvisThoraxDriver does.

The error you are seeing is not related to the model being overconstraint, the Mocap models use our KinSolOverDeterminate solver which handles overconstraint problems.
The error says it cant honor the constraintsyou have set. When you lock both the pelvis and thorax from moving, the amr motion cant be completed as is. So you need to allow som degree of either pelvis movement, thorax movement or a combination.

Best regards,
Bjørn