Need help in calling the marker function and getting its coordinates in python , for example when we want to call the joint coordinate we use this
Code: Select all
self.osim_model.joints[0].getCoordinate(0).getValue(self.osim_model.state)
Code: Select all
self.osim_model.joints[0].getCoordinate(0).getValue(self.osim_model.state)
Code: Select all
model = Model('path2model.osim');
s = model.initSystem();
% get a reference to a marker (0 index)
m = modelgetMarkerSet().get(0);
b = m.getBody();
% get marker offset on the body
p_l = m.getOffset();
% Use the Simbody Engine to compute location in ground
sbe = model.getSimbodyEngine();
% Define an empty vec3 to put the posiion data into
p_g = Vec3()
% get the position
sbe.getPosition(s, b, p_l, p_g);
Code: Select all
p_g = model.getMarkerSet().get(0).getLocationInGround(s);
Code: Select all
self.osim_model.model.getBodySet().get("r_ulna_radius_hand")
Code: Select all
p_g = model.getMarkerSet().get(0).getLocationInGround(s);
I am not sure how to interpret that. How do you know the hand is moving? When are you doing this analysis? Shouldn't you be setting the value of the coordinate using setValue()but as the hand moves the coordinate are not changing it is repeating the same coordinate
Did you bother to change the index value in .get()?by default it will take the shoulder marker but I need to call the marker found on the wrist