system accelerations vector:
Posted: Tue Jan 14, 2025 2:35 pm
We have a system with three degrees-of-freedom and we set out to solve for the accelerations
given the position, velocity and torque values. Our code looks like the following:
With this code, however, we realize that the accelerations returned remain
insensitive to the applied joint torques. Can someone let us know what is
wrong with the code?
given the position, velocity and torque values. Our code looks like the following:
Code: Select all
const ForceSet& fSet = model.getForceSet();
for (i = 0; i < numActuators; i++)
{
ScalarActuator* act = dynamic_cast<ScalarActuator*>(&fSet.get(i));
if (act)
act->setOverrideActuation(state, -jTorques[i]);
}
model.getMultibodySystem().realize(state, SimTK::Stage::Acceleration);
SimTK::Vector udot = model.getMatterSubsystem().getUDot(state);
for (i = 0; i < numActuators; i++)
xDot[i] = udot[i];
insensitive to the applied joint torques. Can someone let us know what is
wrong with the code?