SetInitialConditions

Hi

I am using a simple two segment arm model (similar to the one of the
tutorial). Then I changed the shoulder joint into ‘AnyStdJoint’ with
the aim to get a rigid joint. I would like to have the upper arm in
y-direction (concerning the global reference system). Then I changed
the r0 and Axes0 of the upper arm segment definitions - and it worked
if I loaded the model. But as soon as I pressed the
SetInitialConditions, the upper arm went to x-direction. Where do I
have to define the position? Do I need a driver for the AnyStdJoint to
define the upper arm position after the SetInitialCondition step?

Thanks in advance,

heidi

Hello Heidi,

People often have problems with this issue. The Axes0 and r0
properties only determine the position of segments when you load the
model. They are used in cases you need to load the segments close to
their final position to enable the system to find the correct
solution to the kinematics.

What you need in your case is something different. Think of the
standard joint as something that ties the position and direction of
two coordinate systems together, namely the two systems meeting in
the joint. The standard joint will always align them completely.

The solution is therefore to rotate the shoulder node relativ to the
humerus. When you specify an AnyRefNode it inherits the coordinate
system of the segment it belongs to. But you can change that in the
specification of the node, for instance like this:

   AnySeg UpperArm = {
     r0 = {0,-0.15,0};
     Axes0 = {{0,1,0},{-1,0,0},{0,0,1}};
     Mass = 2.0;
     Jii = {0.005,0.01,0.01};
     AnyDrawSeg DrwSeg = {};
     AnyRefNode ShoulderNode = {
       sRel = {-0.2,0,0};
       ARel = RotMat(90*pi/180,z);   // New line
     };
    };

The new line specifies a relative rotation of the shoulder node of
90 degrees relative to the humerus coordinate system.

Best regards,
John

— In anyscript@yahoogroups.com, “heidi_knuesel”
<heidi.knuesel@…> wrote:
>
> Hi
>
> I am using a simple two segment arm model (similar to the one of
the
> tutorial). Then I changed the shoulder joint into ‘AnyStdJoint’
with
> the aim to get a rigid joint. I would like to have the upper arm in
> y-direction (concerning the global reference system). Then I
changed
> the r0 and Axes0 of the upper arm segment definitions - and it
worked
> if I loaded the model. But as soon as I pressed the
> SetInitialConditions, the upper arm went to x-direction. Where do I
> have to define the position? Do I need a driver for the
AnyStdJoint to
> define the upper arm position after the SetInitialCondition step?
>
> Thanks in advance,
>
> heidi
>