Change location pointactuator (Matlab API)
Posted: Thu Jun 06, 2013 11:55 pm
Dear Opensim Users,
I’ve a question with regards to defining a pointactuator through the matlab API. After scaling of the model, I want to adjust the location of the residual actuators in the actuator file .
As you can see in the functions below, I search for the location of the COM of the pelvis in the scaled model. Then I want to adjust the location of the pointactuator in the settingsfile. But there is no function like Setpoint…
% search for the hip of the scaled model
model=Model(model_file);
pelvis=model.getBodySet().get('pelvis');
% get the center of mass of the hip
COM_pelvis=ArrayDouble.createVec3([0,0,0]);
pelvis.getMassCenter(COM_pelvis);
% read the actuator file
Acatuator_file=ForceSet(model,’Actuator_file.xml’);
actuators= Acatuator_file.updActuators();
% get the FX (FY and FZ) point actuators
FX=actuators.get('FX');
SO the general question is: How can you adjust the location of a pointactuator?
(For example by FX.setPoint(COM_pelvis) ?).
Regards,
Maarten
I’ve a question with regards to defining a pointactuator through the matlab API. After scaling of the model, I want to adjust the location of the residual actuators in the actuator file .
As you can see in the functions below, I search for the location of the COM of the pelvis in the scaled model. Then I want to adjust the location of the pointactuator in the settingsfile. But there is no function like Setpoint…
% search for the hip of the scaled model
model=Model(model_file);
pelvis=model.getBodySet().get('pelvis');
% get the center of mass of the hip
COM_pelvis=ArrayDouble.createVec3([0,0,0]);
pelvis.getMassCenter(COM_pelvis);
% read the actuator file
Acatuator_file=ForceSet(model,’Actuator_file.xml’);
actuators= Acatuator_file.updActuators();
% get the FX (FY and FZ) point actuators
FX=actuators.get('FX');
SO the general question is: How can you adjust the location of a pointactuator?
(For example by FX.setPoint(COM_pelvis) ?).
Regards,
Maarten