Hello, I want to make a driver for the knee joint, but I want it to rotate one way and then after some time rotate the other way. Both of these movements are at a constant speed. Basically, two AnyKinEqSimpleDriver, but one that works for t1 to t2 and the other that works for t2 to t3. How can I do this?
We have a set of different drivers that could be used for different situations. Please look at the class list in the top right corner of the main frame of AnyBody. You can right-click and insert a template object for each class.
In this particular case you could use an interpolation driver:
AnyKinEqInterPolDriver KneeDriver =
{
Type = PiecewiseLinear;
AnyVar totalSimTime = 3;
T = totalSimTime*{0, 1, 2, 3, 4, 5, 6}/6;
Data = {
{90, 75, 60, 45, 60, 75, 90}
}*pi/180;
AnyKinMeasure &KJ = <Reference to the knee joint here>;
};
You need to specify a PiecewiseLinear type of the interpolation to make sure it would drive through all the points in your data table.
Please note that the Data array is a multidimensional and requires an extra set of brackets, since the kinematic measure could be describing many degrees of freedom at the same time.
And no, it is not possible to do with the AnyKinEqSimpleDriver (i will delete your second thread).