diff --git a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.cpp b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.cpp index 643368fb2854e52ada75118d5cad7a15f8e577d5..77f5f86560acb0e8a0fbd7d71b4eced95a9c4924 100644 --- a/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.cpp +++ b/source/RobotAPI/libraries/RobotAPINJointControllers/DMPController/NJointTaskSpaceImpedanceDMPController.cpp @@ -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;