UpperLimb model strange movement of scapula

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

Hi Bjørn,

thanks for the detailed explanation. Now I have at least understood more about the drivers. I have now switched off the thorax driver and only applied your above solution suggestion. Now the movement and the output looks more realistic.

Now I have another problem:

When the thorax makes a movement backwards, then I have a greater deviation of the sternun markers (see the picture). Do you have any idea, what I can do, that the red dots match the blue dots (c3d data)? Is this also a problem with the driver?

grafik grafik

Best regards,
Lisa

or is the problem, that the pelvis is fixed to the ground and so the red dots are fixed at the thorax?

From the looks of it, the model is not doing any thorax extension. Make sure you have allowed for that movement. Then it's probably a matter of tweaking the constraints you have to make the motion follow the c3d file closer.

Best regards,
Bjørn

The thorax is moving in all directions, also extension.
What kind of constraints could I optimize that the motion follow the c3d file closer? Also the movement of the scapula looks now strange again but the output of the kinematic of the glenohumeral is much better. I tried to fix the problem of the scapula with an SCElevationDriver but that resulted in unreal kinematic output.
Do you think I have a chance to get a realistic movement (that makes sence) of the model, following the c3d data and produces a good output of the kinematic data? Because now I have the problem that I don't really now whether the results could classified as "true/make sence" at all.

Best regards
Lisa

I think you can get more help reading this post. Søren made some suggestions to what drivers to add and how to control them.

Evaluating the motion and output is up to you. I think you can make the model quite accurate when you get the motion right.

Best regards,
Bjørn

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

Thread on this subject is helpful, thanks guys.

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