Modified GaitFullBody for MoCap Shoulder Analysis - Errors

I am using AnyBody version 5.0 with AMMR 1.3. I have downloaded the GaitFullBody model and modified it in the following manner.

First, I removed lower body markers (Pelvis and lower) and markers on left side of the upper body and added and defined several markers (Medial Elbow, Left Back, Finger/Thumb). Since I removed the Pelvis, I had to specify InitialPositions for the pelvis based on constant value instead of marker data, and found that {0,1,0} is very close to lining up the experimental markers and the model markers.

At this point, though, the system had too few constraints for the unknowns, so I started adding in drivers for the joints that were no longer going to be controlled by marker data in the ExtraDrivers.any file. These were added for the ankle, foot, knee, hip, pelvis, left shoulder, left elbow, left wrist in the ExtraDrivers.any file, and the SCDriverRight code was commented out. I am no longer getting errors about constraints and unknowns.

At that point I was getting the error “Newton Relaxation too small” when I run the “RunMotionandParameterOptimizationSequence” operation, followed by a long list of constraints and their errors. I am aware that I can lower the Kinematic Tolerance, and I did temporarily from 0.001 to 0.1, and there are still several that are outside of those more relaxed tolerances. For instance…

“Constraint no. #3 in ‘Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Left.ShoulderArm.Jnt.ScapulaAIThoraxNodeReaction.ContactSegDriver’ above error tolerance 0.100000, error = 1.904010.”

“Constraint no. #1 in ‘Main.Studies.KinematicStudyForParameterIdentification.HumanModel.BodyModel.Right.ShoulderArm.Mus.ArtificialRake.LinCombDrv’ above error tolerance 0.100000, error = 0.200583.”

And, even one of the constraints I specified in ExtraDrivers.any:

“Constraint no. #1 in ‘Main.Studies.KinematicStudyForParameterIdentification.ModelEnvironmentConnection.Drivers.PelvisPostureDrv’ above error tolerance 0.100000, error = 0.526888.”

After the list of errors, it says that Kinematic Analysis failed in time step 0.

My final thought was maybe I’ve added too many constraints to the system, so I commented out my drivers for PelvisThorax motion (ext, lat bend, rot). Once I did that, it progressed further to the “Evaluation KKT conditions (Operation: Main.Studies.KinematicStudyForParameterIdentification.Kinematics)” and gave this error:

WARNING! NAN reached!
Unexpected error in computational kernel
ERROR(OBJ.DES2) : X:/D…n/A…r/A…3/A…n/E…s/G…y/GaitFullBody.main.any : ParameterIdentification.ParameterOptimization : Optimization failed : Failed to solve position analysis

Can anyone provide some guidance on what I may be missing, or what I’m doing wrong?

Hi,

Based on what you wrote here, my simple feeling is that you need to provide some extra drivers for three angles between the pelvis and the thorax segments.

This is important because you seemed to remove the markers in the pelvis segment.

Best regards,
Moonki

P.S) I’m sorry to say but we don’t support the problems based on the old AMS and AMMR versions.
At the moment our latest AMS version is 6.0.X.
And our latest AMMR version is 1.6.x.

I added drivers for the PelvisThorax relationship and things are progressing. In the meantime, I also manipulated the model so that the initial position of the captured markers are very close to the modeled markers. Immediately after starting the RunMotionAndParameterOptimizationSequence, The lower arm and hand line up correctly, but the rest of the model drops downward about half a body length. I attached pictures to show what is happening.

My advisor and I have been debating on whether to upgrade, but research funding is scarce at the moment so we are trying to make do with what we have if at all possible. Unless the upgraded version makes things much easier or what I’m trying to do is not possible with this version, I feel he will insist on us not upgrading yet. I appreciate any help you can provide and have provided.

Hi again,

When I looked at your pictures, I guess that you also need the marker data for the thorax segment.

Because it seems that there is no marker information either in the trunk or in the pelvis,
there is not enough information to determine the kinematics of the trunk segments such as thorax and pelvis.

It seems that you are only providing the kinematics infomation on your arm.

This is nothing related to a speicific version of AnyBody.

I suggest you to provide more marker data to make this working.

Best regards,
Moonki

I have T10, C7, STRN, and CLAV on ThoraxSeg. Is that not sufficient? I did not include markers on the Pelvis because I felt they were inconsequential since motion of the lower body is going to be static during the modeled tasks and should be inconsequential on reaction forces at the GH joint.

Hi,

It is strange because if I see your picture ‘after operatoin starts’, the kinematics of your arm seems to follow those relevant markers.

But the markers in the trunk segments, for instance, T10, C7, STRN and CLAV do not seem to play their roles.

Are you sure that you did define those markers correctly?

Best regards,
Moonki

I've pasted the marker definitions below for those 4 markers.

CreateMarker T10 (
MarkerName=T10,
MarkerPlacement=Trunk.SegmentsThorax.ThoraxSeg,
OptX="Off",OptY="Off",OptZ="Off",
WeightX=1.0,WeightY=1.0,WeightZ=1.0,

Model1=MotionAndParameterOptimizationModel,Model2= InverseDynamicModel
) = {
sRelOpt = {-0.052,0.187,0};
};

CreateMarker C7 (
MarkerName=C7,
MarkerPlacement=Trunk.SegmentsThorax.ThoraxSeg,
OptX="Off",OptY="On",OptZ="Off",
WeightX=1.0,WeightY=1.0,WeightZ=1.0,

Model1=MotionAndParameterOptimizationModel,Model2= InverseDynamicModel
) = {
sRelOpt = {-0.04,0.47,0};
};

CreateMarker STRN (
MarkerName=STRN,
MarkerPlacement=Trunk.SegmentsThorax.ThoraxSeg,
OptX="Off",OptY="Off",OptZ="Off",
WeightX=1.0,WeightY=1.0,WeightZ=1.0,

Model1=MotionAndParameterOptimizationModel,Model2= InverseDynamicModel
) = {
sRelOpt = {0.15,0.24,0.0};

};

CreateMarker CLAV (
MarkerName=CLAV,
MarkerPlacement=Trunk.SegmentsThorax.ThoraxSeg,
OptX="Off",OptY="Off",OptZ="Off",
WeightX=1.0,WeightY=1.0,WeightZ=1.0,

Model1=MotionAndParameterOptimizationModel,Model2= InverseDynamicModel
) = {
sRelOpt = {0.085,0.42,0.0};
};

To me, it seems like the pelvis is being forced back to the "Origin", i.e. if I set PelvisPosX, PelvisPosY, and PelvisPosZ equal to 0 in the Mannequin.any file, the location of the pelvis is about the same as where ti ends up after the operation starts. Currently, since I do not have pelvis markers, I defined the initial position in mannequin.any as follows:

AnyVar PelvisPosX = 0.5*(STRN(Main.TrialSpecificData.tStart)[0]+T10(Main.TrialSpecificData.tStart)[0]);
AnyVar PelvisPosY = 0.75;
AnyVar PelvisPosZ = STRN(Main.TrialSpecificData.tStart)[2];

I'm not sure if this has anything to do with it, but it stuck out to me so I thought I'd mention it.

Hi,

Please try to upload your model here:
http://forum.anyscript.org/forumdisplay.php?f=21

As I said, we don’t support the old version based models.

So we will try to test your model based on the latest AMS version but we will try to filnd the closest version of AMMR that you use.

Best regards,
Moonki