Pelvis mobility forces = 0 - not correct
Posted: Sun Oct 28, 2018 11:22 am
Hi all,
I have 31 coordinate actuators - getMobilityForces vector returns values as expected after I have set the controls for these DoFs.
I have 3 torque and 3 point actuators for the 6 pelvis DoFs - getMobilityForces vector returns zeros after I have set the controls for these DoFs - these values should be non-zero.
Does anyone have any idea why this?
Code:
PrescribedController* controller = dynamic_cast<PrescribedController*>(&controllerSet.get(0));
for (int index = 0; index < nActuators; index++)
{
controller->prescribeControlForActuator(index, new Constant(control_vars[index]));
}
myModel.updMultibodySystem().realize(myState, Stage::Dynamics);
const Vector& mf = myModel.getMultibodySystem().getMobilityForces(myState, Stage::Dynamics);
getMobilityForces output:
~[0 0 0 0 0 0 -91.3713 -2.58656 0.363775 -55.033 -2.32601 1.35196 0.134994 90.2715 -16.3504 3.61922 27.1173 4.19173 -0.861287 0.159846 -3.82231 -12.908 22.5087 4.61437 -2.798 0.228085 2.42431 -0.238017 0.147474 -0.382614 -1.90044 1.48016 0.534239 -0.437608 0.0226138 0.120517 0.00314895]
Thanks,
Nicos
I have 31 coordinate actuators - getMobilityForces vector returns values as expected after I have set the controls for these DoFs.
I have 3 torque and 3 point actuators for the 6 pelvis DoFs - getMobilityForces vector returns zeros after I have set the controls for these DoFs - these values should be non-zero.
Does anyone have any idea why this?
Code:
PrescribedController* controller = dynamic_cast<PrescribedController*>(&controllerSet.get(0));
for (int index = 0; index < nActuators; index++)
{
controller->prescribeControlForActuator(index, new Constant(control_vars[index]));
}
myModel.updMultibodySystem().realize(myState, Stage::Dynamics);
const Vector& mf = myModel.getMultibodySystem().getMobilityForces(myState, Stage::Dynamics);
getMobilityForces output:
~[0 0 0 0 0 0 -91.3713 -2.58656 0.363775 -55.033 -2.32601 1.35196 0.134994 90.2715 -16.3504 3.61922 27.1173 4.19173 -0.861287 0.159846 -3.82231 -12.908 22.5087 4.61437 -2.798 0.228085 2.42431 -0.238017 0.147474 -0.382614 -1.90044 1.48016 0.534239 -0.437608 0.0226138 0.120517 0.00314895]
Thanks,
Nicos