Adding actuators for static optimization through MATLAB
Posted: Tue Nov 20, 2018 10:29 am
Hi all
We are trying to run a static optimization through MATLAB with an added set of residual actuators. According to a previous forum post (viewtopicPhpbb.php?f=91&t=8480&p=0&start=0&view=), we have added our actuator set using the follwing code (blue highlighted section):
import org.opensim.modeling.*
model = Model(modelfile);
statop = AnalyzeTool(statopsetupfile);
statop.setModel(model)
ForceSet = ArrayStr();
ForceSet.set(0,'S:\Examplepath\FeetActuators.xml');
statop.setForceSetFiles(ForceSet);
statop.setCoordinatesFileName(motionfile)
statop.setExternalLoadsFileName(extloadsfile);
statop.setResultsDir(resultpath);
statop.run();
The problem is that it does not seem to actually add the actuator set and we don't get the message '"Adding force object set from S:\Examplepath\FeetActuators.xml'. Is there something missing in our code?
Thank you very much for your help!
All the best
-Stefan
We are trying to run a static optimization through MATLAB with an added set of residual actuators. According to a previous forum post (viewtopicPhpbb.php?f=91&t=8480&p=0&start=0&view=), we have added our actuator set using the follwing code (blue highlighted section):
import org.opensim.modeling.*
model = Model(modelfile);
statop = AnalyzeTool(statopsetupfile);
statop.setModel(model)
ForceSet = ArrayStr();
ForceSet.set(0,'S:\Examplepath\FeetActuators.xml');
statop.setForceSetFiles(ForceSet);
statop.setCoordinatesFileName(motionfile)
statop.setExternalLoadsFileName(extloadsfile);
statop.setResultsDir(resultpath);
statop.run();
The problem is that it does not seem to actually add the actuator set and we don't get the message '"Adding force object set from S:\Examplepath\FeetActuators.xml'. Is there something missing in our code?
Thank you very much for your help!
All the best
-Stefan