calcResidualForceIgnoringConstraints() inputs
Posted: Mon Nov 19, 2018 8:47 am
Hi everybody,
My model has 37 DOFs actuated by 31 coordinate actuators, 3 torque actuators and 3 point actuators (the latter 6 are residual actuators at the pelvis) and is made up of 21 rigid bodies.
I am currently trying to get my head around the inputs appliedMobilityForces and appliedBodyForces for calcResidualForceIgnoringConstraints().
I believe I am extracting the necessary MobilityForces and BodyForces after I have updated the controller for each actuator by doing the following:
However, when I print to screen the mobilityforces for the first 6 mobilities they are all 0 and the remaining 31 mobilities are the value I would expect based upon the control value and optimal force.
If I do the following:
I then receive the expected (generalised force) for the FX point actuator and knee_angle_r coordinate actuator (this value matches the value in the mfs vector).
Please could someone clarify why I am receiving this mismatch?
Kind regards,
Nicos Haralabidis
My model has 37 DOFs actuated by 31 coordinate actuators, 3 torque actuators and 3 point actuators (the latter 6 are residual actuators at the pelvis) and is made up of 21 rigid bodies.
I am currently trying to get my head around the inputs appliedMobilityForces and appliedBodyForces for calcResidualForceIgnoringConstraints().
I believe I am extracting the necessary MobilityForces and BodyForces after I have updated the controller for each actuator by doing the following:
Code: Select all
myModel.updMultibodySystem().realize(myState, Stage::Dynamics);
const Vector_<SpatialVec>& rigidBFs = myModel.getMultibodySystem().getRigidBodyForces(myState, Stage::Dynamics);
const Vector mfs = myModel.getMultibodySystem().getMobilityForces(myState, Stage::Dynamics);
If I do the following:
Code: Select all
double fx = myModel.getActuators().get("FX").getForce(myState);
double knee_r = myModel.getActuators().get("knee_angle_r").getForce(myState);
Please could someone clarify why I am receiving this mismatch?
Kind regards,
Nicos Haralabidis