For my model I want to drive a joint in a “realistic” way, meaning inital velocity of 0, smooth acceleration phase, maximum velocity in mid phase, smooth deceleration phase to final velocity of 0.
To implement this in an easy way my first idea was to use AnyKinEqFourierDriver with a Sin function like that:
AnyKinEqFourierDriver SinDriver = {
AnyRevoluteJoint &Jnt = Main.ModelDef.Jnts.Shoulder;
Type = Sin;
Freq = 1.0/2;
A = { {0.0, 1} };
B = { {0.0, -3.14/2 } };
Reaction.Type = {Off};
};
The results can be find attached as “sinus driver_current”
Everything looks great, but the inital starting point. As you can see on the plot (and as expected), the motion is starting from -1 instead of 0.
Thus, is there a way to shift the sin function in y-direction? How could i implement it in Anybody (e.g. using differnent driver class).
Attached you will find an image of the desired motion task profile.
There might be more elegant ways to this by using the Fourier in another way, my solution below is making use of the a linear combination measure which simply add an offset of 1.