Kinem. Meas. + Inverse Dynamics

Hi,

I have two segments in my Anybody model both of which have drivers.The system is to be analyzed for forward kinematics first, and a kinematic measure is recorded. Now one of the drivers is removed and the kinematic measure is to be used to drive the system for analyzing inverse dynamics. However, when I drive the system the solver pops an error stating that Kinematic analysis failed in time step 0. While defining the drivers I do not define any DriverPos for forward kinematics. And so when the drivers are running in inverse dynamics analysis the segment positions should be compatible with the one that exists during the forward kinematics analysis. However, during forward kinematics analysis the position of both the links is altered due to model calibration(muscle calibration + joint constraints realization). But when analyzing the system for inverse dynamics even before such calibration is done (which then will bring the segments in the same position as that achieved in forward kinematics mode) the solver displays an error.

The above fact becomes worst when I need to orient the link using DriverPos for forward kinematics and it can’t be done for inverse dynamics as the driver is no more defined.

Is there a way to overcome the above problem in Anybody?

Hi,

AnyBody does not have a forward solver, so you will not be able to run a forward analysis first and the feed the motion into an inverse dynamic analysis in the way you describe sorry.

What you can do is to run an inverse-inverse dynamic analysis, this is done by setting up a optimization study that call an normal inverse dynamic study. The design parameters of the optimization problem can be parameters used to describe the motion in the inverse dynamic study. You will need to have a good optimization criteria for the optimization study, this criteria should be useful for determine the motion, so for a jumping model it could be the speed os center of mass at take off. You will also need a good way to parametrize the motion so that you will get a good description of the motion motion using a minimum of design variables.

When defining a driver you are allowed to define it without a DriverPos but then it will use a default value of zero for this positon, so when you analysis fails it could be because the model would not be able to assemble having a driverpos at zero.

I hope this made things clearer

Best regards
Søren

Hi Soren,

I think I didn’t get myself through. I am using different simulations to carry out forward kinematics and inverse dynamics analysis. Here is how I am currently carrying out the analysis:

  1. Uncommenting the code for both the segment drivers and a kinematic measure to store the data for node to node distance variation. The DriverPos for both the drivers is zero. Analyze the system for forward kinematics. (Though the solver might carry out an inverse dynamics analysis in the background).

  2. Now manually comment the code for one of the drivers and putting a driver for the kinematic measure and driving it with the data stored from the previous simulation. Here also the DriverPos for both the drivers is zero. The simulation fails to run due to “Kinematic analysis failed in time step 0”. Now, the cause of the failure should not be inassemblability as the DriverPos is zero for both the simulations.

What might be the cause of failure in this case?

Hi,

What it seems to me is that the original driver and the kinematic measure driver you try to replace it with are not equivalent for some reason and drive a different degree of freedom. It is difficult to say more without the model.

I think you should check the equivalence of the two drivers, by making some simple sketches for example.

Best regards, Sylvain.

Hi Sylvain,

The drivers in the two cases should be equivalent because it is when the first two drivers are working that the third one is being recorded. And the third one is then used to drive the model by commenting one of the first two. However, while setting up the initial conditions the position of the various segments alter slightly in the first case. And due to which when the analysis is run with the recorded driver working, the analysis fails even before the initial conditions are being applied to the model.

Is there a way I can skip the initial condition loading step by directly loading the model in that initial state. I can position and orient the segments that are defined by me in the model. However, when it comes to model repository there are a lot of segments and therefore manual editing seems impossible. Also, I checked the model repository for any initial positions file from where the initial positions of various segments in the repository model can be directly read. However, the file "InitialPositions.any"contains only Axes0 definition and no r0. r0 is defined in the “Seg.any” file but here it’s definition has dependency with other segment positions. Is there a way I can set these r0 vectors for various segments using a file?

Hi,

Even if the initial position is slightly diferent the kinematic should be able to solve if the drivers are correct. Make sure that for example you are not driving more (or less) dof with the recorded measure than the joint driver was.

If you really want to input manually the initial condition you can for example output with an anyoutputfile the position and orientation of each segment during your first analysis and use the step 0 value as initial condition for the second analysis.

Best regards, Sylvain.

Hi Sylvain,

Thanks, that’s what I was looking for. I know how to use anyoutputfile. But I am not so sure about how to setup step 0 value as initial condition for the second analysis. Do I have to manually pick out the position vectors defined in seg.any file and provide them by including a file? I am also not aware of using the step value as initial condition for an analysis. Could you provide me an example or link to an example.

Regards,
Priyanshu

Hi Priyanshu,

This has to be done manually yes. Once you have the output file with all r and axes values of the segment through time, you need to manually copy paste the value corresponding to the first step. This first step value will replace the r0 in the Seg.any file and the Axes0 in the InitialPosition.any file for each segment.

Best regards, Sylvain.