Forums Anyscript.org  

Go Back   Forums Anyscript.org > General Forum > AnyBody Modeling System

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2018, 05:09 AM
cocoboat cocoboat is offline
Junior Member
 
Join Date: May 2018
Posts: 2
Default Joint Movement

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?

Thanks.
Reply With Quote
  #2  
Old 05-13-2018, 08:29 AM
pgalibarov's Avatar
pgalibarov pgalibarov is offline
Senior Member
 
Join Date: Oct 2010
Posts: 940
Default

Hi,

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:

Code:
    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).

Kind regards,
Pavel

Last edited by pgalibarov; 05-15-2018 at 09:27 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:52 AM.