AnySphericalJoint

Hello Every body,

My name is Lola Danhaive. I’m a engineer student at university of
brussels.

For my memory, i’m studying human movement and i decide to use
AnyBody to do it.

i would like to use one of the Delp’s model to create my own model.

But i’m having trouble.

Delp model define, for example, the hip joint as:

beginjoint hip_r
segments pelvis_OT thigh_r_OT
order t r3 r1 r2
axis1 1.000000 0.000000 0.000000
axis2 0.000000 1.000000 0.000000
axis3 0.000000 0.000000 1.000000
tx constant -0.060222
ty constant -0.09307
tz constant 0.087596
r1 function f1(q8)
r2 function f1(q9)
r3 function f1(q7)
endjoint

witch mean that we first have to translate, then turn first on the
axis3 then axis1 and then axis2.

in order to do that i though that i could use the propriety of the
spherical joint following:

AnySphericalJoint

AnyVar Linear.Ref : Integer numbers that specify the reference
system
in which the vector is measured. ‘-1’ is default
meaning the global system, 0 or 1 mean respectively
the first or the second reference system
that have been added to the object. (=- 1.000000)

AnyKinRotationalType Orientation.Type : Coordinate type
specification.
(RotAxesAngles,RotVector, EulerParam)

AnyRefFrameAxis Orientation.Axis1 : First axis of rotation for
RotAxesAngles. (x, y,z)

AnyRefFrameAxis Orientation.Axis2 : Second axis of rotation for
RotAxesAngles. (x,y, z)

AnyRefFrameAxis Orientation.Axis3 : Third axis of rotation for

which are explain on page 101 and 102 of the reference manuel.

so i had try to implement something like:

AnySphericalJoint hipjoint={

AnyRefNode &ref1= .pelvis.hipnode;
AnyrefNode &ref2= .thigh.hipnode;
Linear.Ref=0
Orientation.Type=RotAxesAngles;
Orientation.Axis1=z;
Orientation.Axis2=x;
Orientation.Axis3=y;
}

But it is said : INCORRECT USE OF GLOBAL VARIABLE

i have tried different things, but i really don’t understand how i’m
suppose to use it. Could you help me?

Thank you .

Best Regards,

Lola Danhaive

Hi Lola,

Welcome to the group.

I have looked into your problem, and you actually have a very good
point. There seems to be an error in the parser of the beta release
of version 2.0, which I suppose you are using. The error has been
reported and will be fixed soon.

The official version 1.3 does not have this problem, but you probably
need the new one for the gait model.

While we fix the problem, you can use a workaround.

Forst of all you have som simple syntactical errors in the joint
definition:

1. There is a typo here:
> AnyrefNode &ref2= .thigh.hipnode;
AnyrefNode should be AnyRefNode.
2. You are missing the semicolon after the end brace of the object: };
3. You are missing the semicolong after “Linear.Ref=0;”

Then to make the parser accept your code, do it in the following way:

`````` AnySphericalJoint hipjoint = {
AnyRefNode &ref1= .pelvis.hipnode;
AnyRefNode &ref2= .thigh.hipnode;
Linear.Ref=0;
Orientation = {
Type=RotAxesAngles;
Axis1=z;
Axis2=x;
Axis3=y;
};
};
``````

It is the same as you were trying to do, but written slightly
differently.

Thanks for making us aware of this problem.

Best regards,
AnyBody Support.

wrote:
> Hello Every body,
>
> My name is Lola Danhaive. I’m a engineer student at university of
> brussels.
>
> For my memory, i’m studying human movement and i decide to use
> AnyBody to do it.
>
> i would like to use one of the Delp’s model to create my own model.
>
> But i’m having trouble.
>
> Delp model define, for example, the hip joint as:
>
> beginjoint hip_r
> segments pelvis_OT thigh_r_OT
> order t r3 r1 r2
> axis1 1.000000 0.000000 0.000000
> axis2 0.000000 1.000000 0.000000
> axis3 0.000000 0.000000 1.000000
> tx constant -0.060222
> ty constant -0.09307
> tz constant 0.087596
> r1 function f1(q8)
> r2 function f1(q9)
> r3 function f1(q7)
> endjoint
>
> witch mean that we first have to translate, then turn first on the
> axis3 then axis1 and then axis2.
>
> in order to do that i though that i could use the propriety of the
> spherical joint following:
>
> AnySphericalJoint
>
> AnyVar Linear.Ref : Integer numbers that specify the reference
> system
> in which the vector is measured. ‘-1’ is default
> meaning the global system, 0 or 1 mean respectively
> the first or the second reference system
> that have been added to the object. (=- 1.000000)
>
>
> AnyKinRotationalType Orientation.Type : Coordinate type
> specification.
> (RotAxesAngles,RotVector, EulerParam)
>
> AnyRefFrameAxis Orientation.Axis1 : First axis of rotation for
> RotAxesAngles. (x, y,z)
>
> AnyRefFrameAxis Orientation.Axis2 : Second axis of rotation for
> RotAxesAngles. (x,y, z)
>
> AnyRefFrameAxis Orientation.Axis3 : Third axis of rotation for
>
> which are explain on page 101 and 102 of the reference manuel.
>
> so i had try to implement something like:
>
>
> AnySphericalJoint hipjoint={
>
> AnyRefNode &ref1= .pelvis.hipnode;
> AnyrefNode &ref2= .thigh.hipnode;
> Linear.Ref=0
> Orientation.Type=RotAxesAngles;
> Orientation.Axis1=z;
> Orientation.Axis2=x;
> Orientation.Axis3=y;
> }
>
> But it is said : INCORRECT USE OF GLOBAL VARIABLE
>
> i have tried different things, but i really don’t understand how
i’m
> suppose to use it. Could you help me?
>
> Thank you .
>
> Best Regards,
>
> Lola Danhaive