Chair Jump C3d2any conversion issue

Hi Preet,
you can also simply change the tstart = e.g. 0.8.
That will do the trick.
Best regards,
Sebastian

Hey Sebastian,

I have the position data and analog data in an excel file format and saw that at certain points the data is missing for some markers and in the case of the femoral condyle it is missing in some parts. I was wondering if there is a way to interpolate the missing data in the c3d files in anybody or if you need a c3d editor to fix the file. Or how how can I input the excel file with the after interpolating the missing data.

I do not have a c3d file editor. If that is the last resort I will then look into purchasing the software but would like to find an alternative method. If you could help me out it would be much appreciated. Thank you.

Best Regards,

Preet Sabharwal

Hello Sebastian,

In a strange occurrence it seems that by closing anybody and reopening it I was able to complete a successful kinematic analysis. I was wondering what step I would need to perform to now include the environment file to get the force plate in order to run an inverse dynamics analysis.

Thank you,

Best Regards,

Preet Sabharwal

Hi Preet,

sounds strange that the analysis went ok with markers dropping out, i can only imagine this to go ok if these markers where not used as drivers or had zero weights.

Anyway it is possible to implement a weight function based on the residual on the marker. This residual may be present in the C3D data but it is not always the case. Please have a look at the tutorial
http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/Making_things_move/lesson6.html

If the residual is not present you may be able to create it based on the fact that if the marker drops out it goes to zero pos., and this knowledge you can used in a AnyFunSquareWaweThreshold function to construct a weightfunction for the maker which is time dependent and ensure that the marker is not being used if it dropped out.

This approach implies that you have enough data to keep your model driven even if a marker drops out, how many markers may drop be allowed to drop out is entirely model dependent.

Concerning the force plates, please have a look in the force plate section of your c3d file and detect which type of plates you have. You need to look at the following section:

http://www.c3d.org/html/default.htm?turl=theforceplatformgroup.htm

Once you have determine the type of plate you have you need to ensure that these plate types are part of the predefined plates in body/toolbox/mocap and then you need to define these in the environment.any file. please have a look in the environment.any file of the gaitfullbodymodel for an example.

Best regards
Søren

Best regards
Søren

Hey Søren,

I chose to use data that wasn’t missing. I didn’t need the full motion capture for the simulation. Just the point in which there is a land from the jump. The frames used in this simulation worked because data wasn’t missing in the time frame I used. So now the kinematic analysis is working. My issue is when looking in the force platform group in the c3d data, I can’t find information on my force platform. I have general test information about the force plate on paper. What do you recommend I do in this situation. I am attaching my model. If you could help me out it would be much appreciated. Thank you,

Preet Sabharwal

Hi Preet,

I have looked at the c3d file and see the problem, the type info does not exist in this file, but more importantly i did not find any info on corner locations etc.

I think you will need to construct your own plate in this case… it can be done like this:

[ol]
[li] find out the exact format of the measured forces used coordinate system etc
[/li][li] create a segment and drive it so it has exactly the position and orientation of the coordinate system used for measuring
[/li][li] Make sure it has no reaction to ground
[/li][li] setup six reactions to the foot in contact
[/li][li] apply the measured forces to the plate
[/li][/ol]

I hope this helps

Best regards
Søren

Hey Søren,

Thank you for the advice, I am not quite sure how to go about beginning to construct the force plate. I have the orientation of the coordinate system, the calibration shunt values, the sensitivity and calibration matrices, and the xyz origin relative to the center of the top surface of the platform. I have the analog and position data as well in excel file from the c3d files. I was wondering if there is any other information I need in order to construct the force plate. Also how would I go about creating the a segment for the foceplate and drive it. Thank you.

Best Regards,

Preet Sabharwal

Hi Preet,

I think the information you list will be sufficient to construct the plate.

Basically i think you should look in one of the forceplate classes existing in the toolbox/mocap directory for example, to make it easier look at one the plates which does not have foot auto dection.

Here is the list of steps from previous i have tried to add a few more comments on it.

[ol]
[li]find out the exact format of the measured forces used coordinate system etc Create an AnyFixRefFrame use Axes property to change its orientation as in your lab.
[/li][li]create a segment and drive it so it has exactly the position and orientation of the coordinate system used for measuring since the coordinate system in step one has already been alligned with lab system a AnyStdJoint can be used.
[/li][li]Make sure it has no reaction to ground Remove the reaction to the ground in the StdJoint by setting the Reaction.Constraints={Off,Off,Off,Off,Off,Off}
[/li][li]setup six reactions to the foot in contact
[/li][li]apply the measured forces to the plate remember to use the calibration matrix.
[/li][/ol]

Best regards
Søren

Hello,

Thank you for all of the advice. I have actually performed the motion capture again and although the force plate information is not stored in the c3d file I have the origin and corners data. This is will help me with the force plate. One issue I am currently having with the new data is in the kinematic analysis I am failing in one of the time steps and not quite sure what is causeing this. If you could take a look at my attached file and give me a few suggestions it would be very much appreciated. Thank you.

Best Regards,

Preet Sabharwal

Hello all,

I have recollected the data but for some reason there is no force plate information again. But this time I have the origin info, the forceplate type(type 2) and the corners data. I have input the forces and moments after processing the data in the form of text files and made the changes to the environment file and the forceplate 2 file. The issue I am having is trying to debug the environment file. I was wondering if you could take a look and give me a few tips as I seem to be stuck. Thank you.

Best Regards,

Preet Sabharwal

Hi Preet,

Here are some modifications in the environment file, note the end of the code…

modForcePlateType2 Plate1 (
PlateName = Plate1,
Folder =Main.ModelSetup.C3DFileData,
Limb=  .HumanModelRef.Right.Leg.Seg.Foot,
No=0,
Fx="Fx.txt",
Fy="Fy.txt",
Fz="Fz.txt",
Mx="Mx.txt",
My="My.txt",
Mz="Mz.txt"
) ={};

In the file “modForcePlateType2.any” you need to change the name of the plate to

#class_template modForcePlateType2 (PlateName, Folder,AnySeg &Limb, No, Fx, Fy, Fz, Mx,My,Mz){

also the line

AnyFloat Origins= Folder.Groups.FORCE_PLATFORM.ORIGIN.Data;

needs to be out-commented.
After these changes the model will still not load due the following error:


ERROR(SCR.EXP1) :   C:/U..s/st/D..s/A..t/R..1/A..r/A..n/E..s/N..g/Environment.any  :     Defined At  :   C:/U..s/st/D..s/A..t/R..1/A..r/A..n/E..s/N..g/modForcePlateType2.any  :   '='  :  Illegal operation for given argument types  :  'AnyFloat[ ][ ]' '=' 'AnyString[6]'

the reason is that the these lines in the enviroment file :

Fx="Fx.txt",
Fy="Fy.txt",
Fz="Fz.txt",
Mx="Mx.txt",
My="My.txt",
Mz="Mz.txt"

the forceplate class expects real data not a string…

so you need first create interpolation functions with your data and then points at these in the same as it is done here:

Fx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fx1,
Fy=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fy1,
Fz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Fz1,
Mx=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mx1,
My=Main.ModelSetup.C3DFileData.Analog.DataFiltered.My1,
Mz=Main.ModelSetup.C3DFileData.Analog.DataFiltered.Mz1

Best regards
Søren

Hi Søren,

Thank you for the advice. I am just a little bit confused still as to where I would input the interpolation functions. Meaning where exactly would I input the functions in the code in order to comply with the forceplate 2 class.

Also would I have to input the force data separately as fx, fy, fz, etc as single files such as “fx.txt” or would I put all fx,fy,fz,mx,my,mz in the same file and input the force and moment data in the interpolation function.

If all the data is placed in one file such as force.txt and fx is the first column would I call upon it as Force[1]?

Best Regards,

Preet Sabharwal

Hi Preet,

Normally the data for the forceplates are stored in the c3d file section of the model. When reading in a c3d file AnyBody automatically creates interpolation functions for the data, these interpolation functions is created in the c3d folder.
So i think you take a look at existing models and try to feed the read the data into the c3d folders as if it had existed in the c3d file.
If you can read the data into the right folders you will not need to modify the forceplate class at all.

You can also read the data into the forceplate folder it should make no difference it is just a matter of taste.

The data can be read in either as separate file or as one big, if you use one big file you are right Fx would be Force[0] etc.

Best regards
Søren

Hello all,

I have made some modifications to the c3d file and now have a forceplate. I am trying to get the inverse dynamics analysis completed but keep running into the following error. I have attached my model. Any assistance would be much appreciated. Thanks.

Preet

ERROR(OBJ1) : C:/Users/Pr…l/D…s/A…2/Body/A…n/LegTD/Mus.any : IliacusLateralis3.SPLine : Number of allowed iterations for contact solution has been exceeded in Main.Studies.HumanModel.BodyModel.Right.Leg.Mus.IliacusLateralis3.SPLine

Hi,
this sound like a problem related to muscle wrapping. Have a look at the given muscle. A first go could be to increase the number of divisions for the muscle contact. In the Mus.any file you can find parameters SPLine.StringMesh for the wrapping muscles. Try to increase the muscles causing the problem a little. Secondly have a look in the Modelview if the wrapping is right. You can visualize the wrapping cylinder (which is also specified in the muscle file) and see if this is ok.
Best regards,
Sebastian

Hello Sebastian,

Thank you for the reply. I followed your advice and it worked. I was wondering how I can fix the orientation of the mannequin. It seems to be bent out of shape. What can I do to make the model stand up straight.

Preet

Hi Preet,

Normally this would be in the Mannequin.any file this would change the initial position at load time.

Is it at load time or when you run the model that you see this posture?

Best regards
Søren

Hi,

It’s when I run the inverse dynamics analysis. I didn’t have this problem when running kinematic analysis. I have attached the model. I would really appreciate your help. I was wondering if this posture would affect the muscle forces in the lower extremities. Or is the mannequin posture more for appearance sake in the upper body since it is not really utilized in my simulation.

Preet

Hi Preet,

I could not run your model because the text file with the optimised parameters is missing.
But here is what i saw in the script for the trunk posture: the angle between thorax and pelvis is fixed. So if the pelvis rotates during the motion so wil the thorax. If you want the thorax to stay straight during the motion you can free the pelvis-thorax rotations and instead fix the rotation between thorax and global ref, or drive the CoM to stay above the pelvis.

Best regards, Sylvain.

Hi Sylvain,
I tried to make the changes that you suggested but was unsuccessful. I am reattaching my model just so you can see exactly what’s going on.

Also I was wondering if you could explain how I can make the changes that you previously suggested. Thanks.

Best Regards,

Preet