AnyFunPolynomial

I am learning the AnyBody with AnyBody Licenser version : 3.22 following the tutorials in version 4.20.
There is the AnyFunPolynomial class in the tutorial as follows,
AnyKinMotion JointDriver = {
AnyRevoluteJoint &Jnt = .Joint;
AnyFunPolynomial DriverFun = {
PolyCoef = {{0, 3, 5}};
};
};
.
What is its correspondences (of AnyFunPolynomial) in version 3.22?

Hi

I think the version number you list is relevant for the licenser not the AnyBody version, if you click the About box there should be a version number for the AnyBody version.

The AnyPolynomial function has not been changed between versions as far as i remember.

Please explain in more detail what the problem is, i am not sure i fully understand the question.

Best regards
Søren

Hi
Thank you for your prompt response.
The version I used is
AnyBody version : 3. 0. 3.
Build : 14070.26941

I could not find the AnyFunPolynomial class in the above version.

Best regards,

ZZ

Hi,
the function was not available to my knowledge, but you can simple use the AnyKinEqPolynomialDriver to drive the model with a polynominal function.
Best regards,
Sebastian

Thanks a lot. I had trouble with the following error:
Evaluating model...
ERROR(OBJ1) : C:\Documents and Settings\zzyan\Application Data\AnyBody Technology\AnyBody.3.x.x\Repository.7.0\Application\Examples\pendulum.any(27) : 'DriverFun.PolyCoef' : The number of rows in the matrix must be the same as the number of driven coordinates
Deleting last loaded model...Done.
Model loading skipped

Where is a wrong? The source codes I edited as follows:

// Model for the "Making Things Move" tutorial.
Main = {

// The actual body model goes in this folder
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
}; // Global reference frame

AnySeg Pendulum = {
Mass = 1;
Jii = {1, 0.01, 1}/15;
AnyRefNode Origin = {
sRel = {0, 0.5, 0};
};
AnyRefNode P1 = {
sRel = {0, -0.5, 0};
};
AnyDrawSeg drw = {};
};

AnyKinMeasureOrg JointDriver = {
AnyRevoluteJoint &Jnt = .Joint;
AnyKinEqPolynomialDriver DriverFun = {
PolyCoef = {{0, 3, 5}};
};
};
AnyRevoluteJoint Joint = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Pendulum = .Pendulum.Origin;
};

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
};

}; // Main

Best regards,

ZZ

Hi,
you just did’t get the order of the commands right. The AnyKinEqDriver needs a reference to the joint.
// Model for the “Making Things Move” tutorial.
Main = {

// The actual body model goes in this folder
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
}; // Global reference frame

AnySeg Pendulum = {
Mass = 1;
Jii = {1, 0.01, 1}/15;
AnyRefNode Origin = {
sRel = {0, 0.5, 0};
};
AnyRefNode P1 = {
sRel = {0, -0.5, 0};
};
AnyDrawSeg drw = {};
};

//AnyKinMeasureOrg JointDriver = {
//AnyRevoluteJoint &Jnt = .Joint;

AnyKinEqPolynomialDriver DriverFun = {
PolyCoef = {{0, 3, 5}};
AnyRevoluteJoint &Jnt = .Joint;
};

//};

AnyRevoluteJoint Joint = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Pendulum = .Pendulum.Origin;
};

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver = MinMaxSimplex;
Gravity = {0.0, -9.81, 0.0};
};

}; // Main

Best regards,
Sebastian

Hi,

The syntax of the AnyKinEqPolynomialDriver is a little diferent from the AnyFunPolynomial because it is a driver.
Try to replace this:

AnyKinMeasureOrg JointDriver = {
AnyRevoluteJoint &Jnt = .Joint;
AnyKinEqPolynomialDriver DriverFun = {
PolyCoef = {{0, 3, 5}};
};
};

by this:

AnyKinEqPolynomialDriver DriverFun = {
PolyCoef = {{0, 3, 5}};
AnyRevoluteJoint &Jnt = .Joint;
};

Best regards, Sylvain.

Thank you very much. The problem was cleared. There is another problem: how can I handle the data from a C3D file directly.
The system came to halt, once loading the model that I edited as follows.

// Model for the "Making Things Move" tutorial.
Main = {

// The actual body model goes in this folder
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
};  // Global reference frame

AnySeg Pendulum = {
  Mass = 1;
  Jii = {1, 0.01, 1}/15;
  AnyRefNode Origin = {
    sRel = {0, 0.5, 0};
  };
  AnyRefNode P1 = {
    sRel = {0, -0.5, 0};
  };
  AnyDrawSeg drw = {};
};

AnyInputFile C3D =     {
  FileName = "pendulum.c3d";
  //FileErrorContinueOnOff = Off;
};
//    AnyKinMeasureOrg JointDriver =     {
//      AnyRevoluteJoint &Jnt = .Joint;
AnyKinEqPolynomialDriver DriverFun =     {
  PolyCoef = {{0, 3, 5}};
  AnyRevoluteJoint &Jnt = .Joint;
};

AnyRevoluteJoint Joint = {
  AnyRefFrame &Ground = .GlobalRef;
  AnyRefFrame &Pendulum = .Pendulum.Origin;
};

}; // MyModel

// The study: Operations to be performed on the model
// AnyBodyStudy MyStudy = {
// AnyFolder &Model = .MyModel;
// RecruitmentSolver = MinMaxSimplex;
// Gravity = {0.0, -9.81, 0.0};
// };

}; // Main

Best regards,

ZZ

Hi,

There is a class called AnyInputC3D. It reads and displays automatically the c3d data. You can look at the GaitFullBody or GaitLowerExtremity model for an example of how to make use of it.

Best regards, Sylvain.

Thank you for your answer. Unfortunetly, there is no the AnyInputC3D class as well as the GaitFullBody or GaitLowerExtremity model in my system. My system version is AnyBody version : 3. 0. 3. Build : 14070.26941. How can I input the C3D data in my case?

Best regards,

ZZ

Hi,

Yes the class AnyInputC3D is available from version 4 of AMS. You may want to consider upgarding your own version. AnyBody 4 has a lot of new usefull features as well as the coresponding new version of the repository.

Otherwise to use a c3d file in version 3 you need to use the external application c3d2any. It converts the c3d file into an Anyscript model. You can download it at anyscript.org.

Best regards, Sylvain.