Gait3D markers modification and error during the inverse dynamic analysis

Hi,

I’m playing with the Gait3D model in the last repositery (5.1).
Due to differences between the markers used by Vaughan (1992) and the
markers used by vicon and their pluginGait module, I tried to adapt the
Gait3D model.

First, I cleaned the unecessary markers in the model. So P4, P6, P11 and
P13 are commented. Due to that, the number of DOF and number of drivers
decreased. But this not the problem …

Second, I modified the COP/GRF/GRM to each force plate with my data. But
this not the problem …

Third, There are 3 absent markers in the Vicon marker set :

  • P1 : R.metatarsal head V
  • P8 : L.metatarsal head V
  • P15 : Sacrum

The marker used by Vicon are :

  • Right toe tip
  • Left toe tip
  • R.PSIS and L.PSIS

So, I decided to use these markers to drive my model.
So the data in P1 are now from the right toe tip. In P8, we have the
left toe tip. I’ve changed the necessary drivers to do that :


In ‘Gait3D/JointsAndDrivers.any’ :

// WARNING : IT IS NOT THE Metatarsal head V but the Toetip
AnyKinEqSimpleDriver MetatarsalYRDrv={
  AnyKinLinear lin={
    AnyRefFrame &ref2=Main.Model.HumanModel.Right.Leg.Seg.Foot.Toetip;
    AnyRefFrame &ref1=Main.Model.Markers.p1.Seg;
    Ref=0;
  };
  MeasureOrganizer={0,2};
  DriverPos={0,0};
  Reaction.Type={0,0};
  DriverVel={0,0};
};

// WARNING : IT IS NOT THE Metatarsal head V but the Toetip
AnyKinEqSimpleDriver MetatarsalYLDrv={
  AnyKinLinear lin={
    AnyRefFrame &ref2=Main.Model.HumanModel.Left.Leg.Seg.Foot.Toetip;
    AnyRefFrame &ref1=Main.Model.Markers.p8.Seg;
    Ref=0;
  };
  MeasureOrganizer={0,2};
  DriverPos={0,0};
  Reaction.Type={0,0};
  DriverVel={0,0};
};

To replace the sacrum bony landmark, I estimate it by using :

                 (R.PSIS + L.PSIS) / 2

I modified tStart and tEnd and nStep. We have 20 seconds of acquisition
at 120Hz. To estimate the muscle forces during this time, I set tStart
to 0, tEnd to 11.99. and nStep to 1200.

I added intial positions in ‘InitialPositions.any’ due to some
differences between your initial conditions and mine. (I don’t know the
orientations of the lower limb because Vicon don’t export this
information). Now, the initial positions are the yours and positions of
the markers P1, P2, P3 , … at t=0

I’ve tried to scale my model but unfortunately, after some tests, I
can’t set the length of the segment like I wanted (I had an error when
Anybody want to resolve kinematic constraints). So in ‘AnyMan.any’ I set
lower limb segments to approximately their size :

 AnyVar ThighLength = 0.46;
 AnyVar ShankLength = 0.43;
 AnyVar FootLength = 0.26;
 AnyVar PelvisWidth = 0.175;

Finally, I launch the inverseDynamicAnalysis (After the
calibrationSequence) … However, after 90 iterations (approximatively),
I have this error :
ERROR : C:\Documents and Settings\abarre\Desktop\Repository
5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Number of
allowed iterations for contact solution has been exceeded in
Main.Model.HumanModel.Left.Leg.Mus.Iliopsoas.SPLine

Because the Sacrum is over-estimate, I decided to suppress the
‘AnyKinMeasure &u3 = …SacrumLz’ in ‘AnyKinEqSimpleDriver AsisZDrv’
Because, the error between the landmark and the marker are too
important. Maybe, it could resolve my problem. However, I had a new error :
ERROR : C:\Documents and Settings\abarre\Desktop\Repository
5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Unexpected
exception in the library OOSol :
OOSol exception : General factorization exception : Negative or zero
pivot
So I decided to don’t suppress this line in this driver

I tried too, to use the ‘BodyModel_NoMuscles.any’ because the error
message speaks about the Iliopsoas muscle … Finally my model work ! BUT :

  • when the left lower limb is in the swing phase, the pelvis movement
    is … odd …
  • the left foot during the swing phase is oriented to +45 degres with
    the PD global axes
  • I have this warning (In fact, this warninig was here with my others
    precedent tests) : WARNING - Approx. positions of
    ‘Main.Model.ModelEnvironmentConnection.JointsAndDrivers.AsisZDrv.LinComb’
    are not set (this is not yet possible in AnyKinMeasureLinComb)

If I try the other definition of the Iliopsoas muscle
(AnyViaPointMuscle) in ‘BRep\Aalborg\Leg3D\Mus.any’, My model works
during approximately 780 iterations but after I have this error :
ERROR : C:\Documents and Settings\abarre\Desktop\Repository
5.1\ARep\Lio\Gait3D\AnyGait.main.any(106) : Study : Muscle
recruitment analysis failed, simplex solver reports that solution does
not satisfy all constraints.

I made some assumptions in this model :

  • Sacum = (R.PSIS + L.PSIS) / 2 ;
  • Same segment orientations than you ;

I wanted to move the sacrum marker to a true marker like the Right PSIS
or the Left PSIS. Unfortunately, In the spine model and more precisely
in PelvisSeg, you have not define these points…

Maybe my error is not here but is it possible to obtain relative
coordinates of the Right and Left PSIS in the pelvis segment ?

Regards,

Arnaud Barré


Laboratoire de recherche en imagerie et orthopédie (LIO)
École de technologie supérieure
Centre de recherche du CHUM - Hôpital Notre-Dame
Pavillon J.A. de Sève
1560, rue Sherbrooke Est, Y-1615
Montréal (Québec) H2L 4M1 CANADA

Téléphone : (514) 890-8000 poste 28723
Télécopieur : (514) 412-7785

Courriel : arnaud.barre.1@ens.etsmtl.ca
Site internet : http://www.lio.etsmtl.ca


Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs
exceptionnels pour appeler la France et l’international.
Téléchargez sur http://fr.messenger.yahoo.com

Hi Arnaud

I will try to answer your uestion one by one :

The problems with the illiopsoas muscles and the errors:

> 5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Number of
> allowed iterations for contact solution has been exceeded in
> Main.Model.HumanModel.Left.Leg.Mus.Iliopsoas.SPLine

ERROR : C:\Documents and Settings\abarre\Desktop\Repository
> 5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Unexpected
> exception in the library OOSol :
> OOSol exception : General factorization exception : Negative
or zero
> pivot

are both related to the wrapping of the illiopsoas muscles as you
also have discovered by replaceing it with a via point muscle. The
remedy is to add more points to represents the muscle wrapping. This
can be done by increasing the variable StringMesh in the illiopsoas
muscle definition, this will normally make the wrapping more robust.

Scaling:
It is difficult to say why it fails kinematically when you try to
scale the model, there can be may reasons. It could be the initial
positions of the markers. We have recently made the following
changes in the file MarkerMover.any which will automatically set the
markers in the correct initial positions, currently in your version
all markers start in zero

AnyFunInterpol MarkerData =
{
Type=Bspline;
BsplineOrder = 8;
FileName =.datafile;//reference to the name of the data file to use
};

AnySeg Seg={
r0=.MarkerData(Main.Study.tStart);
Mass=0;
Jii={0.0,0.0,0.0};
AnyRefNode node={
sRel={0,0,0};
AnyDrawNode drw={ScaleXYZ={0.01,.01,.01};};
};
};

So please open the MarkerMover.any file and add the MarkerData
folder and replace the Segment with the Seg defined above. As you
can see it will that the initial pos of the segment (r0) directly
from the datafile, this will make the kinematics of the initial
steps more robust and maybee this will make it possible to scale the
model as you would like.

The odd pelvis motion you have when the left leg is in the swing
phase could also be due to the scaling. If the length of the limbs
are not correct it may be shown as unexpected rotations of the
pelvis, since the feet are 100% controlled the errors sums up and
are most visible in the pelvis motion.

You should not worry about the warning:
WARNING - Approx. positions of
> ‘Main.Model.ModelEnvironmentConnection.JointsAndDrivers.AsisZDrv.Li
nComb’
> are not set (this is not yet possible in AnyKinMeasureLinComb)
This is something related to that when you use the linear
combination measures the joints initial positions can not be
estimated by the system. In the next version of the system this
warning can only be seen in a log file not in the message window.

It is possible to add extra markers to the pelvis segment in the
following way.
1 open the file MarkerPosOnBody.any
2 find the the pelvis folder
3 add the extra nodes like below:

AnyFolder MarkerPosOnModel ={

AnyFolder &Pelvis =
Main.Model.HumanModel.Trunk.SegmentsLumbar.PelvisSeg;

Pelvis={
AnyRefNode NEWNODE = {
// sRel={0.12,-0.065,0.13};
sRel=.Scale({0.108750, -0.058906, 0.117813});
AnyDrawNode drw={
ScaleXYZ={0.01,.01,.01};
RGB={0,0,1};
};
AnyDrawRefFrame drawcoor={};
//This will draw a cooridnate system
//at the node origin this may help position it correctly
};
};

Finally about the recruitment problem:

ERROR : C:\Documents and Settings\abarre\Desktop\Repository
> 5.1\ARep\Lio\Gait3D\AnyGait.main.any(106) : Study : Muscle
> recruitment analysis failed, simplex solver reports that solution
does not satisfy all constraints.

As you may know this simply means that the muscle recruitment could
not balance the system in any way. It is likely that better scaling
of the person and changed kinematics will help on this.

I am not sure if this applies to your case, but we have found that
sometimes in big models if a problem has primarily forces in one
direction and limited amount of forces in the other directions it
may lead to recrtuitment problems. This is especially the case if
there are very big differences in muscles strengths for example when
we use strong muscles for supporting the model like we do in some
models. A simple way to check if this case with your model simply
add a small insignificant amount of gravity to the model
something like:

 Gravity = {0.001, 0.001,-9.81};

Please do not hesitate to write again if you have further questions

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Arnaud BARRÉ <arnaud.barre.1@…>
wrote:
>
> Hi,
>
> I’m playing with the Gait3D model in the last repositery (5.1).
> Due to differences between the markers used by Vaughan (1992) and
the
> markers used by vicon and their pluginGait module, I tried to
adapt the
> Gait3D model.
>
> First, I cleaned the unecessary markers in the model. So P4, P6,
P11 and
> P13 are commented. Due to that, the number of DOF and number of
drivers
> decreased. But this not the problem …
>
> Second, I modified the COP/GRF/GRM to each force plate with my
data. But
> this not the problem …
>
> Third, There are 3 absent markers in the Vicon marker set :
> - P1 : R.metatarsal head V
> - P8 : L.metatarsal head V
> - P15 : Sacrum
>
> The marker used by Vicon are :
> - Right toe tip
> - Left toe tip
> - R.PSIS and L.PSIS
>
> So, I decided to use these markers to drive my model.
> So the data in P1 are now from the right toe tip. In P8, we have
the
> left toe tip. I’ve changed the necessary drivers to do that :
>
> --------------------------------------------------------------
> In ‘Gait3D/JointsAndDrivers.any’ :
> --------------------------------------------------------------
> // WARNING : IT IS NOT THE Metatarsal head V but the Toetip
> AnyKinEqSimpleDriver MetatarsalYRDrv={
> AnyKinLinear lin={
> AnyRefFrame
&ref2=Main.Model.HumanModel.Right.Leg.Seg.Foot.Toetip;
> AnyRefFrame &ref1=Main.Model.Markers.p1.Seg;
> Ref=0;
> };
> MeasureOrganizer={0,2};
> DriverPos={0,0};
> Reaction.Type={0,0};
> DriverVel={0,0};
> };
>
> // WARNING : IT IS NOT THE Metatarsal head V but the Toetip
> AnyKinEqSimpleDriver MetatarsalYLDrv={
> AnyKinLinear lin={
> AnyRefFrame
&ref2=Main.Model.HumanModel.Left.Leg.Seg.Foot.Toetip;
> AnyRefFrame &ref1=Main.Model.Markers.p8.Seg;
> Ref=0;
> };
> MeasureOrganizer={0,2};
> DriverPos={0,0};
> Reaction.Type={0,0};
> DriverVel={0,0};
> };
> --------------------------------------------------------
>
> To replace the sacrum bony landmark, I estimate it by using :
>
> (R.PSIS + L.PSIS) / 2
>
>
> I modified tStart and tEnd and nStep. We have 20 seconds of
acquisition
> at 120Hz. To estimate the muscle forces during this time, I set
tStart
> to 0, tEnd to 11.99. and nStep to 1200.
>
> I added intial positions in ‘InitialPositions.any’ due to some
> differences between your initial conditions and mine. (I don’t
know the
> orientations of the lower limb because Vicon don’t export this
> information). Now, the initial positions are the yours and
positions of
> the markers P1, P2, P3 , … at t=0
>
> I’ve tried to scale my model but unfortunately, after some tests,
I
> can’t set the length of the segment like I wanted (I had an error
when
> Anybody want to resolve kinematic constraints). So in ‘AnyMan.any’
I set
> lower limb segments to approximately their size :
>
> AnyVar ThighLength = 0.46;
> AnyVar ShankLength = 0.43;
> AnyVar FootLength = 0.26;
> AnyVar PelvisWidth = 0.175;
>
>
> Finally, I launch the inverseDynamicAnalysis (After the
> calibrationSequence) … However, after 90 iterations
(approximatively),
> I have this error :
> ERROR : C:\Documents and Settings\abarre\Desktop\Repository
> 5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Number of
> allowed iterations for contact solution has been exceeded in
> Main.Model.HumanModel.Left.Leg.Mus.Iliopsoas.SPLine
>
> Because the Sacrum is over-estimate, I decided to suppress the
> ‘AnyKinMeasure &u3 = …SacrumLz’ in ‘AnyKinEqSimpleDriver AsisZDrv’
> Because, the error between the landmark and the marker are too
> important. Maybe, it could resolve my problem. However, I had a
new error :
> ERROR : C:\Documents and Settings\abarre\Desktop\Repository
> 5.1\BRep\Aalborg\Leg3D\Mus.any(203) : Iliopsoas : Unexpected
> exception in the library OOSol :
> OOSol exception : General factorization exception : Negative
or zero
> pivot
> So I decided to don’t suppress this line in this driver
>
> I tried too, to use the ‘BodyModel_NoMuscles.any’ because the
error
> message speaks about the Iliopsoas muscle … Finally my model
work ! BUT :
> - when the left lower limb is in the swing phase, the pelvis
movement
> is … odd …
> - the left foot during the swing phase is oriented to +45 degres
with
> the PD global axes
> - I have this warning (In fact, this warninig was here with my
others
> precedent tests) : WARNING - Approx. positions of
> ‘Main.Model.ModelEnvironmentConnection.JointsAndDrivers.AsisZDrv.Li
nComb’
> are not set (this is not yet possible in AnyKinMeasureLinComb)
>
>
> If I try the other definition of the Iliopsoas muscle
> (AnyViaPointMuscle) in ‘BRep\Aalborg\Leg3D\Mus.any’, My model
works
> during approximately 780 iterations but after I have this error :
> ERROR : C:\Documents and Settings\abarre\Desktop\Repository
> 5.1\ARep\Lio\Gait3D\AnyGait.main.any(106) : Study : Muscle
> recruitment analysis failed, simplex solver reports that solution
does
> not satisfy all constraints.
>
>
> I made some assumptions in this model :
> - Sacum = (R.PSIS + L.PSIS) / 2 ;
> - Same segment orientations than you ;
> - …
>
> I wanted to move the sacrum marker to a true marker like the Right
PSIS
> or the Left PSIS. Unfortunately, In the spine model and more
precisely
> in PelvisSeg, you have not define these points…
>
> Maybe my error is not here but is it possible to obtain relative
> coordinates of the Right and Left PSIS in the pelvis segment ?
>
>
> Regards,
>
> Arnaud Barré
>
> –
> Laboratoire de recherche en imagerie et orthopédie (LIO)
> École de technologie supérieure
> Centre de recherche du CHUM - Hôpital Notre-Dame
> Pavillon J.A. de Sève
> 1560, rue Sherbrooke Est, Y-1615
> Montréal (Québec) H2L 4M1 CANADA
>
> Téléphone : (514) 890-8000 poste 28723
> Télécopieur : (514) 412-7785
>
> Courriel : arnaud.barre.1@…
> Site internet : http://www.lio.etsmtl.ca
>
>
>
>
>
>



> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez
les tarifs exceptionnels pour appeler la France et l’international.
> Téléchargez sur http://fr.messenger.yahoo.com
>