Elbow Constraint
Posted: Sat May 15, 2021 5:38 am
Hi, I want to learn how to add an elbow constraint. Are there people who can help me with this?
<SimmSpline name = "">
<x> -2.09439510 -1.39626340 -1.04719755 -0.69813170 -0.34906585 -0.17453293 ... </x>
<y> 0.01710145 0.03202815 0.03766273 0.04250649 0.04636173 0.04784451 ... </y>
</SimmSpline>
how can I change the values here for the elbow?
When I run the code below, the elbow does not move as desired. I thought I should use the ConstraitSet to fix this.
***
import org.opensim.modeling.*;
path='C:\Users\nuref\Documents\OpenSim\4.0\Geometry';
ModelVisualizer.addDirToGeometrySearchPaths(path);
model = Model('ustekstremite.osim');
model.setUseVisualizer(true);
state = model.initSystem();
storage = Storage('inverse_dynamics.sto');
numCoords = model.getNumCoordinates();
q = Vector(numCoords, 0);
for i = 0:storage.getSize()-1
dat = storage.getStateVector(i).getData();
for j = 0:numCoords-1
q.set(j, dat.get(j));
end
state.setQ(q);
model.getVisualizer().show(state);
end
***
<SimmSpline name = "">
<x> -2.09439510 -1.39626340 -1.04719755 -0.69813170 -0.34906585 -0.17453293 ... </x>
<y> 0.01710145 0.03202815 0.03766273 0.04250649 0.04636173 0.04784451 ... </y>
</SimmSpline>
how can I change the values here for the elbow?
When I run the code below, the elbow does not move as desired. I thought I should use the ConstraitSet to fix this.
***
import org.opensim.modeling.*;
path='C:\Users\nuref\Documents\OpenSim\4.0\Geometry';
ModelVisualizer.addDirToGeometrySearchPaths(path);
model = Model('ustekstremite.osim');
model.setUseVisualizer(true);
state = model.initSystem();
storage = Storage('inverse_dynamics.sto');
numCoords = model.getNumCoordinates();
q = Vector(numCoords, 0);
for i = 0:storage.getSize()-1
dat = storage.getStateVector(i).getData();
for j = 0:numCoords-1
q.set(j, dat.get(j));
end
state.setQ(q);
model.getVisualizer().show(state);
end
***