Problem in C++ API on PointKinematics
Posted: Thu Dec 18, 2014 2:44 am
Hello, everyone,
I am using PointKinematics in tracking interested points on the model. It runs well in GUI, but when I implement it using C++ API, I encounter some problems. The following is my example code for setting PointKinematics:
There are 3 functions which I commented always throw exception. I have no idea how to fix it? Could anyone help me? Thanks very much.
Best regards,
Yu-Wei
I am using PointKinematics in tracking interested points on the model. It runs well in GUI, but when I implement it using C++ API, I encounter some problems. The following is my example code for setting PointKinematics:
Code: Select all
// Set Point Kinematics
PointKinematics pk = PointKinematics();
pk.setName("PointKinematics");
pk.setOn(true);
pk.setStartTime(10.0);
pk.setEndTime(markerData.getLastFrameTime());
pk.setStepInterval(10);
pk.setInDegrees(true);
Model pkModel = Model(pkModelFile);
OpenSim::Body& ground = pkModel.getGroundBody();
OpenSim::Body& torso = pkModel.updBodySet().get("torso");
//pk.setBody(&torso);
//pk.setRelativeToBody(&ground);
pk.setPointName("TEST");
//pk.setPoint(Vec3(0.0, 0.0, 0.0));
Best regards,
Yu-Wei