Skip to content

Commit

Permalink
Replace AnyKinEqSimpleDriver with AnyKinMotion
Browse files Browse the repository at this point in the history
  • Loading branch information
melund committed Feb 12, 2024
1 parent 42bdf5e commit 255ade4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
6 changes: 2 additions & 4 deletions A_study_of_studies/Downloads/arm2d.any
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,17 @@ Main = {
AnyFolder Drivers = {

//---------------------------------
AnyKinEqSimpleDriver ShoulderMotion = {
AnyKinMotion ShoulderMotion = {
AnyRevoluteJoint &Jnt = ..Jnts.Shoulder;
DriverPos = {-100*pi/180};
DriverVel = {30*pi/180};
Reaction.Type = {Off};
}; // Shoulder driver

//---------------------------------
AnyKinEqSimpleDriver ElbowMotion = {
AnyKinMotion ElbowMotion = {
AnyRevoluteJoint &Jnt = ..Jnts.Elbow;
DriverPos = {90*pi/180};
DriverVel = {45*pi/180};
Reaction.Type = {Off};
}; // Elbow driver
}; // Driver folder

Expand Down
Binary file modified A_study_of_studies/Downloads/arm2d.zip
Binary file not shown.
36 changes: 16 additions & 20 deletions A_study_of_studies/lesson1.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,18 @@ kinematically indeterminate:
```AnyScriptDoc
AnyFolder Drivers = {
//---------------------------------
§//      AnyKinEqSimpleDriver ShoulderMotion = {
//---------------------------------
§//      AnyKinMotion ShoulderMotion = {
//        AnyRevoluteJoint &Jnt = ..Jnts.Shoulder;
//        DriverPos = {-100*pi/180};
//        DriverVel = {30*pi/180};
//        Reaction.Type = {Off};
//      }; // Shoulder driver§
    //---------------------------------
    AnyKinEqSimpleDriver ElbowMotion = {
//---------------------------------
AnyKinMotion ElbowMotion = {
AnyRevoluteJoint &Jnt = ..Jnts.Elbow;
DriverPos = {90*pi/180};
DriverVel = {45*pi/180};
Reaction.Type = {Off};
}; // Elbow driver
}; // Driver folder
```
Expand All @@ -127,56 +125,54 @@ constraints to be kinematically determinate.


This means that when you open the model, the system automatically detects that there

might be too few kinematic constraints for the model. This can make it impossible to assemble the mechanism and very unlikely to run a kinematic analysis. If you double-click the ArmStudy folder to open the Object Description window, you will see this output:

![Object description, number of constraints](_static/lesson1/image3.png)

The Mechanical System Information lets you examine closely how many

constraints are not there and what kind they might be. Let us move

the missing driver back into place:
constraints are not there and what kind they might be. Let us move
the missing driver back into place:

```AnyScriptDoc
§//---------------------------------
AnyKinEqSimpleDriver ShoulderMotion = {
AnyKinMotion ShoulderMotion = {
  AnyRevoluteJoint &Jnt = ..Jnts.Shoulder;
  DriverPos = {-100*pi/180};
  DriverVel = {30*pi/180};
  Reaction.Type = {Off};
}; // Shoulder driver§
//---------------------------------
AnyKinEqSimpleDriver ElbowMotion = {
AnyKinMotion ElbowMotion = {
  AnyRevoluteJoint &Jnt = ..Jnts.Elbow;
  DriverPos = {90*pi/180};
  DriverVel = {45*pi/180};
  Reaction.Type = {Off};
}; // Elbow driver
```

... and try something else:

```AnyScriptDoc
//---------------------------------
AnyKinEqSimpleDriver ShoulderMotion = {
AnyKinMotion ShoulderMotion = {
  AnyRevoluteJoint &Jnt = ..Jnts.Shoulder;
  DriverPos = {-100*pi/180};
  DriverVel = {30*pi/180};
  Reaction.Type = {§On§};
}; // Shoulder driver
//---------------------------------
AnyKinEqSimpleDriver ElbowMotion = {
AnyKinMotion ElbowMotion = {
  AnyRevoluteJoint &Jnt = ..Jnts.Elbow;
  DriverPos = {90*pi/180};
  DriverVel = {45*pi/180};
  Reaction.Type = {§On§};
}; // Elbow driver
§AnyReacForce ExtraReactionForces = {
  AnyRevoluteJoint &Jnt = ..Jnts.Shoulder;
  AnyRevoluteJoint &Jnt = ..Jnts.Elbow;
};§
```

Here, we have activated the reaction forces in the two joint drivers. This is like putting motors into the joints, and
Here, we have added extra reaction forces to the two joints. This is like putting motors into the joints, and
it means that the system will get enough reaction forces to support the
loads without needing any muscles, which matches the statically
determinate case 2 above. Loading the model does not cause any warnings, but if you run the InverseDynamics operation you will see the following message for each time-step.
Expand Down

0 comments on commit 255ade4

Please sign in to comment.