Floating muscle via points and combined Motion

Dear AnyBody Team

I have two questions for you:

  1. Is there a way to model muscle via points that are not fixed on a
    segment but will change their position according to the position of a
    joint? For example a muscle wraps only over the Viapoint1 if the joint
    is flexed more than let’s say 90 degrees, or the viapoint moves
    up/down with changing extension/flexion…

  2. I would like to define the angles of joint B (Universal) according
    to the position of joint A (Revolute). Let’s assume some arbitrary
    relation between these to joints:

B1 = 2A and
B2= 0.5A + 5/180
pi

Therefore I have defined the following driver:
AnyKinEqSimpleDriver CombinedMotion = {
AnyKinMeasureLinComb Measure = {
AnyRevoluteJoint &J1= Main.Model.Jnts.JointA;
AnyUniversalJoint &J2= Main.Model.Jnts.JointB;

     Coef = {{2, -1, 0},{0.5,0,-1}};
     Const = {0, 5/180*pi};
   };

   DriverPos = {0,0};
   DriverVel={0,0};
   Reaction.Type={Off, Off};
 };

};

As far as I understand the AnyKinMeasureLinComb function, I can only
define linear relations between various measures. Is there a way to
incorporate a non-linear relation between these two measures? E.g. B1=
A^2 or using a logarithmic scale?

Many thanks for your help.

Christine

Hi Christine

Here are some answers

Q1: the short answer is that this is not possible. In order to do such a
thing you will need to introduce an extra segment which the muscle would go
through, and drive it separately to obtain this.

Q2: you are right; the combination measure can only be used for creating
linear relations. You can make use of the norm combination measure to select
between different LinComb measures like yours. Then these measures could
each have different coefficients. I think it would be possible, but it is
not easy to work with I known, but this is the only option at the moment.

Best regards

Søren


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of christine_schaerer
Sent: 16 May 2008 10:35
To: anyscript@yahoogroups.com
Subject: [AnyScript] Floating muscle via points and combined Motion

Dear AnyBody Team

I have two questions for you:

  1. Is there a way to model muscle via points that are not fixed on a
    segment but will change their position according to the position of a
    joint? For example a muscle wraps only over the Viapoint1 if the joint
    is flexed more than let’s say 90 degrees, or the viapoint moves
    up/down with changing extension/flexion…

  2. I would like to define the angles of joint B (Universal) according
    to the position of joint A (Revolute). Let’s assume some arbitrary
    relation between these to joints:

B1 = 2A and
B2= 0.5A + 5/180
pi

Therefore I have defined the following driver:
AnyKinEqSimpleDriver CombinedMotion = {
AnyKinMeasureLinComb Measure = {
AnyRevoluteJoint &J1= Main.Model.Jnts.JointA;
AnyUniversalJoint &J2= Main.Model.Jnts.JointB;

Coef = {{2, -1, 0},{0.5,0,-1}};
Const = {0, 5/180*pi};
};

DriverPos = {0,0};
DriverVel={0,0};
Reaction.Type={Off, Off};
};
};

As far as I understand the AnyKinMeasureLinComb function, I can only
define linear relations between various measures. Is there a way to
incorporate a non-linear relation between these two measures? E.g. B1=
A^2 or using a logarithmic scale?

Many thanks for your help.

Christine

[Non-text portions of this message have been removed]

Hi Søren

I have feared I would get this answer, although I hoped there would be
an easier way to implement floating via points. But thanks for your
help anyway.

Theoretically, I could run an analysis to determine the position of
the joint A in order to calculate the position of joint B. However, I
still hope there is another solution to it…

Do you see any possibility to incorporate a lookup table?
Within our group, we had some discussions if (and how) it is possible
to include look up tables. For example, I could create an
AnyFunInterpol Lookuptable = {

};

with the respective input and output values given by T and Data
respectively. But now I am stuck, how can I convert this lookup table
into a driver?

However I do it, I always got the error message:

‘DriverVel’ : Expression evaluation failed at moment ‘DesignVar’ :
‘AAngle’ : argument will not be ready for evaluation until moment ‘PosVar’

Any Idea?

Many thanks
Christine

— In anyscript@yahoogroups.com, “AnyBody Support” <support@…> wrote:
>
> Hi Christine
>
>
>
> Here are some answers
>
>
>
> Q1: the short answer is that this is not possible. In order to do such a
> thing you will need to introduce an extra segment which the muscle
would go
> through, and drive it separately to obtain this.
>
> Q2: you are right; the combination measure can only be used for creating
> linear relations. You can make use of the norm combination measure
to select
> between different LinComb measures like yours. Then these measures could
> each have different coefficients. I think it would be possible, but
it is
> not easy to work with I known, but this is the only option at the
moment.
>
>
>
> Best regards
>
> Søren
>
>
>
> _____
>
> From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com]
On Behalf
> Of christine_schaerer
> Sent: 16 May 2008 10:35
> To: anyscript@yahoogroups.com
> Subject: [AnyScript] Floating muscle via points and combined Motion
>
>
>
> Dear AnyBody Team
>
> I have two questions for you:
>
> 1. Is there a way to model muscle via points that are not fixed on a
> segment but will change their position according to the position of a
> joint? For example a muscle wraps only over the Viapoint1 if the joint
> is flexed more than let’s say 90 degrees, or the viapoint moves
> up/down with changing extension/flexion…
>
> 2. I would like to define the angles of joint B (Universal) according
> to the position of joint A (Revolute). Let’s assume some arbitrary
> relation between these to joints:
>
> B1 = 2A and
> B2= 0.5A + 5/180
pi
>
> Therefore I have defined the following driver:
> AnyKinEqSimpleDriver CombinedMotion = {
> AnyKinMeasureLinComb Measure = {
> AnyRevoluteJoint &J1= Main.Model.Jnts.JointA;
> AnyUniversalJoint &J2= Main.Model.Jnts.JointB;
>
> Coef = {{2, -1, 0},{0.5,0,-1}};
> Const = {0, 5/180*pi};
> };
>
> DriverPos = {0,0};
> DriverVel={0,0};
> Reaction.Type={Off, Off};
> };
> };
>
> As far as I understand the AnyKinMeasureLinComb function, I can only
> define linear relations between various measures. Is there a way to
> incorporate a non-linear relation between these two measures? E.g. B1=
> A^2 or using a logarithmic scale?
>
> Many thanks for your help.
>
> Christine
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

Hi Christine,

You got this error message because of the order of evaluation in
time. You cannot change this order, but to avoid the problem one
solution is to write this lookup table in a text file.
You should run two analyses for that. In the first one, drive the
first joint alone and set the second one to some constant value. Then
copy in a text file the position of the first join regarding to time.

In the second analysis keep driving the first joint and use an
AnyKinEqInterPolDriver using the text file for the second one. You
might have to read the text file first through an AnyFunInterpol to
then be able to extract separately T and Data and input that in the
AnyKinEqInterPolDriver. Now you can apply any operation you want
(linear or non linear) to the Data member of the
AnyKinEqInterPolDriver, and so on driving the position of the second
joint depending on the position of the first joint.

I hope this is clear.

Best regards,
Sylvain, AnyBody Support.

— In anyscript@yahoogroups.com, “christine_schaerer”
<christine_schaerer@…> wrote:
>
> Hi Søren
>
>
> I have feared I would get this answer, although I hoped there would
be
> an easier way to implement floating via points. But thanks for your
> help anyway.
>
> Theoretically, I could run an analysis to determine the position of
> the joint A in order to calculate the position of joint B. However,
I
> still hope there is another solution to it…
>
>
> Do you see any possibility to incorporate a lookup table?
> Within our group, we had some discussions if (and how) it is
possible
> to include look up tables. For example, I could create an
> AnyFunInterpol Lookuptable = {
> …
> };
>
>
> with the respective input and output values given by T and Data
> respectively. But now I am stuck, how can I convert this lookup
table
> into a driver?
>
> However I do it, I always got the error message:
>
> ‘DriverVel’ : Expression evaluation failed at
moment ‘DesignVar’ :
> ‘AAngle’ : argument will not be ready for evaluation until
moment ‘PosVar’
>
> Any Idea?
>
> Many thanks
> Christine
>
>
> — In anyscript@yahoogroups.com, “AnyBody Support” <support@>
wrote:
> >
> > Hi Christine
> >
> >
> >
> > Here are some answers
> >
> >
> >
> > Q1: the short answer is that this is not possible. In order to do
such a
> > thing you will need to introduce an extra segment which the muscle
> would go
> > through, and drive it separately to obtain this.
> >
> > Q2: you are right; the combination measure can only be used for
creating
> > linear relations. You can make use of the norm combination measure
> to select
> > between different LinComb measures like yours. Then these
measures could
> > each have different coefficients. I think it would be possible,
but
> it is
> > not easy to work with I known, but this is the only option at the
> moment.
> >
> >
> >
> > Best regards
> >
> > Søren
> >
> >
> >
> > _____
> >
> > From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com]
> On Behalf
> > Of christine_schaerer
> > Sent: 16 May 2008 10:35
> > To: anyscript@yahoogroups.com
> > Subject: [AnyScript] Floating muscle via points and combined
Motion
> >
> >
> >
> > Dear AnyBody Team
> >
> > I have two questions for you:
> >
> > 1. Is there a way to model muscle via points that are not fixed
on a
> > segment but will change their position according to the position
of a
> > joint? For example a muscle wraps only over the Viapoint1 if the
joint
> > is flexed more than let’s say 90 degrees, or the viapoint moves
> > up/down with changing extension/flexion…
> >
> > 2. I would like to define the angles of joint B (Universal)
according
> > to the position of joint A (Revolute). Let’s assume some arbitrary
> > relation between these to joints:
> >
> > B1 = 2A and
> > B2= 0.5A + 5/180
pi
> >
> > Therefore I have defined the following driver:
> > AnyKinEqSimpleDriver CombinedMotion = {
> > AnyKinMeasureLinComb Measure = {
> > AnyRevoluteJoint &J1= Main.Model.Jnts.JointA;
> > AnyUniversalJoint &J2= Main.Model.Jnts.JointB;
> >
> > Coef = {{2, -1, 0},{0.5,0,-1}};
> > Const = {0, 5/180*pi};
> > };
> >
> > DriverPos = {0,0};
> > DriverVel={0,0};
> > Reaction.Type={Off, Off};
> > };
> > };
> >
> > As far as I understand the AnyKinMeasureLinComb function, I can
only
> > define linear relations between various measures. Is there a way
to
> > incorporate a non-linear relation between these two measures?
E.g. B1=
> > A^2 or using a logarithmic scale?
> >
> > Many thanks for your help.
> >
> > Christine
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>