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