# Motion

How to drive segment to move in two directions? the AnyPrismaticJoint can not achieve this motion with only one direction translation.

another way is not effective as below

``````AnyFolder KinematicMeasures = {

AnyKinLinear MedialPos = {

AnyRefNode &Ground = Main.MyModel.GlobalRef.GroundAttach;

AnyRefNode &MedialNode = Main.MyModel.Medial.InsectRef;

};
``````

};

`````` AnyKinEqSimpleDriver Medialmotion  = {

AnyKinLinear &Jnt = .KinematicMeasures.MedialPos;
MeasureOrganizer = {0,2};
DriverPos = {0.4,0.1};
DriverVel  = {0.1,0.1};
Reaction.Type = {Off,Off};
};
``````

Model is kinematically indeterminate : Position analysis failed : 3 independent constraints and 7 unknowns

is there any other way to do?

Many thanks

Hi

The code you have created looks in principle ok but you are only driving two dof in the model the remaining dof betweent the two segs are unconstrained.

``````AnyKinRotational MedialRot = {
AnyRefNode &Ground = Main.MyModel.GlobalRef.GroundAttach;
AnyRefNode &MedialNode = Main.MyModel.Medial.InsectRef;
Type =RotAxesAngles;
};

AnyKinEqSimpleDriver Medialmotion = {

AnyKinLinear &Jnt1 = .KinematicMeasures.MedialPos;
AnyKinRotational &Jnt2 = .KinematicMeasures.MedialRot;
MeasureOrganizer = {1,3,4,5};  // drive y linear pos, and the three rotations
DriverPos = {0.0,0.0,0.0,0.0}; //drive to zero
DriverVel = {0.0,0.0,0.0,0.0};
Reaction.Type = {On,On,On,On};
};

``````

Please also consider to add a Ref =0; in the linear measure to ensure it will use local coodinates and not the global system?

Best regards
Søren

WARNING : Model is kinematically indeterminate : Position analysis failed : 8 independent constraints and 14 unknowns
- attemps to continue (attempt no. 1)

ERROR : Model is kinematically indeterminate : Velocity and acceleration analysis failed : 6 independent constraints and 12 unknowns

And, what is the meaning of independent constraints and unknow?

best regard

Hi

The error you get indicates that you are missing 6 drivers or constraints in the model before it will be kinematically determinate.

The error says:
6 independent constraints and 12 unknowns,

You would get this error in a model having two segments 2 x 6 DOf = 12 uknowns and e.g. two spherical joints adding 2x3 DOF constraints to the problem.

So it looks like you have added an extra segment to the model since your first post? you have 12 unknowns…

Then the number of driver i have added will not be enough.

You will need to have a macth between the number of DOF you add in a model in terms of segments each adding six dof and the number of constraints you add to the model in terms of driver or joints.

Best regards

Søren