Skip to content
Snippets Groups Projects
Commit 4e40e9fb authored by Armar6's avatar Armar6
Browse files

added valid target check

parent 524679b9
No related branches found
No related tags found
No related merge requests found
......@@ -239,6 +239,11 @@ namespace armarx
debugOutputData.getWriteBuffer().desired_nullspaceJoint[jointNames[i]] = desiredNullSpaceJointValues(i);
targets.at(i)->torque = desiredTorque;
if (!targets.at(i)->isValid())
{
ARMARX_INFO << deactivateSpam(1) << "Torque controller target is invalid - setting to zero! set value: " << targets.at(i)->torque;
targets.at(i)->torque = 0.0f;
}
}
debugOutputData.getWriteBuffer().currentCanVal = dmpCtrl->debugData.canVal;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment