Specifications
216
The AnyKinLinear is really a vector between the two points it refers to, i.e. in this case the position of the
knee in the global reference frame. However, we only wish to drive one of the coordinates of this vector,
namely the lateral coordinate. This is the z coordinate, which in an AnyScript model has number two,
because numbering begins at 0. To drive only this one coordinate, we insert a measure organizer:
AnyKinEqSimpleDriver KneeDriver = {
AnyKinLinear GlobKnee = {
AnyRefFrame &Glob = Main.MyPedal.EnvironmentModel.GlobalRef;
AnyRefFrame &Knee = Main.MyPedal.HumanModel.Right.Leg.Seg.Thigh.KneeJoint;
};
MeasureOrganizer = {2};
DriverPos = {0};
DriverVel = {0};
};
};
This has the effect of neglecting the x and y coordinates of the vector returned by the linear measure. You
should be able to load the model again, but there is no visible difference.
5. Drive the pedal
The final step is to drive the movement of the pedal. It is hinged to the origin of the coordinate system, and
we shall add a driver to the joint angle pretty much like we did with the ankle and the knee.
AnyKinEqSimpleDriver KneeDriver = {
AnyKinLinear GlobKnee = {
AnyRefFrame &Glob = Main.MyPedal.EnvironmentModel.GlobalRef;
AnyRefFrame &Knee = Main.MyPedal.HumanModel.Right.Leg.Seg.Thigh.KneeJoint;
};
MeasureOrganizer = {2};
DriverPos = {0};
DriverVel = {0};
};
AnyKinEqSimpleDriver Pedal = {
AnyRevoluteJoint &Hinge = Main.MyPedal.EnvironmentModel.HingeJoint;
DriverPos = {100*pi/180};
DriverVel = {45*pi/180};
};
This puts the pedal in an initial 100 degree angle compared to vertical. It also specifies a movement with an
angular velocity of 45 degrees per second, but let us postpone the investigation of that for later.
For now, hit F7 again to reload the model. Notice that the system no longer complains about the model
being kinematically indeterminate. Run the SetInitialConditions operation to get things connected. With a
little luck you will get this picture:










