I'm quite new in using OpenSim and I have a problem with the point kinematics tool.
- The goal:
My main goal is to validate a new approach in the estimation of joints' angles.
- The procedure:
To validate my approach I need to:
a. apply the angles computed with my approach to the OpenSim model
b. at each time step, store the absolute position of virtual markers
c. compare the positions of virtual markers from point b. to the positions of real markers recorded in our motion lab.
- The problem:
I've tried to collect this information using OpenSim APIs either using the point kinematics tool or writing some C++ code.
Both ways I got data that are quite different from the positions in the real markers data file (.c3d or .trc).
To my knowledge, I should have recorded the markers positions with respected to the ground system of reference. But as they are different something must be wrong.
- The questions:
a. Is there a hidden transformation between the ground and the motion lab system of reference that I'm not aware of? I'm asking because if I add a new virtual marker using the position of a real marker the GUI shows it in a wrong position.
b. If this transformation exists, how can I get its parameters?
c. If I'm totally wrong about the hidden transformation, any suggestions on how to have meaningful values for virtual markers' positions?
Thank you in advance for your help,
Luca
P.S.: In the following the lines of code I'm using:
Code: Select all
myModelNew.getMultibodySystem().realize(myState, SimTK::Stage::Position);
for(unsigned int i=0; i<modelMarkerSet.getSize();i
index = modelMarkerSet.getIndex(names[i],index);
if (index >=0){
OpenSim::Marker& marker = modelMarkerSet[index];
const SimTK::MobilizedBody& mobod =myModelNew.getMatterSubsystem()
.getMobilizedBody(marker.getBody().getIndex());
const SimTK::Transform& X_GB = mobod.getBodyTransform(myState);
std::cout << X_GB*marker.getOffset()<<" "<<names[i] << std::endl;
}
}