Problems on kinematic analysis of model finger


I’m a student trying to get some knowledge about the Anybody software.

I’m currently trying to go through an old project where we built a kinematic model of a finger on the software MSC ADAMS, using Anybody this time.

At that time we had lots of problems cause the STL files of the bones were taken in a different reference frame than the reference frame of the Vicon System that captured the finger moving. Adams couldn’t solve the system unless we pre-processed the Vicon data in order to make it have the same reference frame as the STL files.
We used a finger model with 4 bones and 9 markers.

I tried to use the Anyscript of Dr Wu available in Application/Beta folder and adapt it to my needs by getting rid of the muscles and the tendons (this is just a kinematic analysis, not an inverse dynamic analysis).

Though, I’m getting multiple problems with the script.

I tried first to follow Dr Fu’s method and drove the model by imposing the motion the 3 joints of the finger using .txt files, but it seems like Anybody only accepts .txt files with data separated by space, not comma.
I ran a C program to get rid of that, ran the program again, and obtained the result “too much data in the file”.

So I decided to use the c3d file instead (joined to this message). But the kinematic analysis couldn’t run. I’m actually afraid it’s again because of the two different reference frames between Dr Wu’s STL files and my .c3d file.

I uploaded the .c3d file and the .any file, only the main one cause the others one are the exact same ones from Dr Wu’s analysis.

Could you please help me with that ?


PS : stupid question, but how do you get rid of the yellow global reference frame in the model view ?
I thought it came from the “AnyDrawRefFrame” function but disabling it doesn’t change anything.

Hi Robin,

I took a quick look at you model and fixed a few things, there is a still a way to go but now you can see the markers.

[li]I have changed the size of the coordinate system displayed.[/li][li]Changed the PointScaleFactor... markerdata was in mm not in m.[/li][li]Enabled the construct model to make the markers visual[/li][/ol]To proceed please do the following:[ol]
[li]swicth out all marker drivers[/li][li]Create drivers which simply lock all joints in a fixed position, not using interpolation drivers as they do now[/li][li]Make the base of the model a segment not a fixed ref frame, this will alow you to move it space with marker[/li][li]make sure this models runs by it self kinematically in a fixed location, you will need to add a linear and rotational measure and drivers to the new base segment. Make sure it runs kinematically[/li][li]Remove the linear driver and replace it by a maker, make sure it runs...[/li][li]add a more markers drivers one by one...[/li][/ol]Hope this made sense

Best regards

Main = {

// The actual body model goes in this folder

#include "Index_parameters.any"

#include "Index_metacarpal.any"

#include "Index_segments.any"

#include "Index_joints.any"

AnyInputC3D C3D = {
FileName = "16041201.c3d";
//ReadAllDataOnOff = On;
//TruncateExtraCharsInNamesOnOff = On;
//PointsScaleFactor = 1;
ConstructChartOnOff = Off;
//MarkerUseCamMaskOnOff = On;
//MarkerIndices = ;
//MarkerLabels = ;
//MarkerFilterIndex = 0;
//ProcessedDataFilterIndex = 0;
//AnalogFilterIndex = -1;
Filter = {
AutomaticInitialConditionOnOff = On;
FilterForwardBackwardOnOff = On;
N = 2;
Fc = {3};
Type = LowPass;
//WriteMarkerDataToFilesOnOff = Off;
//MarkerScaleXYZ = {0.025, 0.025, 0.025};
MarkerRGB = {0, 0, 1};
//MarkerDrawOnOff = On;
//MarkerInterPolType = Bspline;
//MarkerBsplineOrder = 8;
//AnyKinDriverMarker C3Dmotion1 = {
// AnyRefFrame &Marker =Main.IndexModel.Segs.Distal_Phalanx.Dis_DIPO;
// AnyParamFun &Trajectory= Main.IndexModel.C3D.Points.Markers.tip.PosInterpol;
// AnyDrawKinMeasure drw = {
// Label = Off;Size = 0.003;Line = Off;
// };
// };
// AnyKinDriverMarker C3Dmotion2 = {
// AnyRefFrame &Marker = Main.IndexModel.Segs.Distal_Phalanx.DIP_JT_Node;
// AnyParamFun &Trajectory = Main.IndexModel.C3D.Points.Markers.IPD.PosInterpol;
// AnyDrawKinMeasure drw = {
// Label = Off;Size = 0.003;Line = Off;
// };
// };
// AnyKinDriverMarker C3Dmotion3 = {
// AnyRefFrame &Marker = Main.IndexModel.Segs.Middle_Phalanx.DIP_JT_Node;
// AnyParamFun &Trajectory = Main.IndexModel.C3D.Points.Markers.IPP.PosInterpol;
// AnyDrawKinMeasure drw = {
// Label = Off;Size = 0.003;Line = Off;
// };
// };

}; // IndexModel



//MuscleEliminationTol = 1e-3;
}; //AnyBodyStudy

}; [SIZE=2]// Main


I must say I’m really confused about steps 2 and 3.

For step 2, should I drive the marker using an AnyKinDriver function as in the tutorial with the pendulum ? (

I also saw you used the file Index_drivers whereas I disabled it cause I had the error “Problem with file : C:\Users\Robin…\IPP.txt(1) : Too many values on line in data file.”
I replaced Dr Fu’s file by my own file just to give it a try, but it didn’t work. Is it cause the file is too long ? It has 432 frames for each marker (a total of nine markers, with a conventional marker set for a finger : 3 markers per bone, as close as possible to the joints).

Plus I don’t get why I should use the c3d file and another file that contains the information that is already available in the c3d file.

I join my own version of the Index_Drivers.any file and one driving file so that you can tell me if the problem comes from my files or from something else.


Hi Robin,

Sorry for the slow reply,

Step 2: As i recall this model, he is using an interpolation function for driving the finger joints. This is a joing angle versus time function, it reads the angles and time values from files. This means that the it will cause problems for you because you may use different time values. That is why i would like you to simply create a constant angle driver for the joints first to enable you to move on, and remove the drivers he used.

So I think you should not use the concept of these interpolation functions for the fingers joints like he does, you have the data in C3D in terms of markers, he had joint angles. So that is why in step 2 you are taking these drivers away and replace with just a constant angles. This enable you get the model running as a stiff finger together with your moving marker data. Once you have this you can then gradually free up the finger joint drivers you just appleid and replace them by the marker data.

Sorry for the confusion,

Best regards