Specifications

163
But let us imagine that we wanted the hand to reach out an grab something at a specific position. It would
probably be difficult to figure out precisely how to drive the two joint angles to put the hand in the position
we wanted it to attain. Instead, we would want to be able to put the hand (actually the wrist since this
simple model has no hand) directly at the desired position in space and have the elbow and shoulder joints
follow implicitly. This is where the kinematic measures come into play. Let's start off with the model just
about where we left in the "Getting Started with AnyScript" tutorial. Please click here to download the
necessary file, and save it in some working directory on your own hard disk.
Let us try initially to create a kinematic measure that will allow us to track the movement of the wrist. To
honor the folder structure of the model we shall create a new folder for the kinematic measure. Let's place it
just below the Jnts folder to reflect the kinship between kinematic measures and joints:
}; // Jnts folder
AnyFolder KinematicMeasures = {
AnyKinLinear WristPos = {
// These are the nodes that the measure refers to
AnyFixedRefFrame &Ground = Main.ArmModel.GlobalRef;
AnyRefNode &UpperArmNode = Main.ArmModel.Segs.LowerArm.HandNode;
Ref = 0;
};
}; // KinematicMeasures
An AnyKinLinear is a kinematic measure that gauges the spatial vector between two points. The line Ref = 0
means that the coordinates of this linear distance are measured in the coordinate system first of the
measure's end points which in this case happens to be the global reference frame. For other options, please
refer to the Reference Manual
.
So far, we have just added a measure that allows us to track the movement of the hand, but it is still driven
by the joint drivers as before. Let's investigate what we have. Load the model and run a KinematicAnalysis
or an InverseDynamicAnalysis, and subsequently open a ChartFX view.
Expanding the tree though Main.ArmModelStudy.Output.Model.KinematicMeasures.WristPos will give you the
options shown to the below.