Skip to content
Snippets Groups Projects
Commit 3c6aae1f authored by armar-user's avatar armar-user
Browse files

changed kp

parent aaff6e61
No related branches found
Tags sh_review_2020_43
No related merge requests found
......@@ -187,6 +187,16 @@ FTSensorValue CartesianNaturalPositionControllerProxy::getCurrentFTValue(bool su
}
return ft;
}
armarx::FTSensorValue armarx::CartesianNaturalPositionControllerProxy::getAverageFTValue(bool substactOffset)
{
FTSensorValue ft = _controller->getAverageFTValue();
if (substactOffset)
{
ft.force = ft.force - _ftOffset.force;
ft.torque = ft.torque - _ftOffset.torque;
}
return ft;
}
void CartesianNaturalPositionControllerProxy::stopClear()
{
......@@ -347,14 +357,14 @@ void CartesianNaturalPositionControllerProxy::setMaxVelocities(float referencePo
_runCfg.maxElbPosVel = v.basePosVel * v.scaleElbPosVel * scale;
_runCfg.maxJointVelocity = ScaleVec(v.baseJointVelocity, v.scaleJointVelocities * scale);
_runCfg.maxNullspaceVelocity = ScaleVec(v.baseJointVelocity, v.scaleNullspaceVelocities * scale);
_runCfg.KpPos = k.baseKpTcpPos * scale;
_runCfg.KpOri = k.baseKpTcpOri * scale;
_runCfg.elbowKp = k.baseKpElbPos * scale;
_runCfg.jointLimitAvoidanceKp = k.baseKpJla * scale;
_runCfg.nullspaceTargetKp = k.baseKpNs * scale;
_runCfg.maxNullspaceAcceleration = k.maxNullspaceAcceleration * scale;
_runCfg.maxPositionAcceleration = k.maxPositionAcceleration * scale;
_runCfg.maxOrientationAcceleration = k.maxOrientationAcceleration * scale;
_runCfg.KpPos = k.baseKpTcpPos; // * scale;
_runCfg.KpOri = k.baseKpTcpOri; // * scale;
_runCfg.elbowKp = k.baseKpElbPos; // * scale;
_runCfg.jointLimitAvoidanceKp = k.baseKpJla; // * scale;
_runCfg.nullspaceTargetKp = k.baseKpNs; // * scale;
_runCfg.maxNullspaceAcceleration = k.maxNullspaceAcceleration; // * scale;
_runCfg.maxPositionAcceleration = k.maxPositionAcceleration; // * scale;
_runCfg.maxOrientationAcceleration = k.maxOrientationAcceleration; // * scale;
_controller->setConfig(_runCfg);
}
......@@ -508,3 +518,5 @@ CartesianNaturalPositionControllerProxy::ScopedJointValueRestore::~ScopedJointVa
//ARMARX_IMPORTANT << "restoring joint values";
rns->setJointValues(jointValues);
}
......@@ -135,6 +135,7 @@ namespace armarx
void enableFTLimit(float force, float torque, bool useCurrentFTasOffset);
void disableFTLimit();
FTSensorValue getCurrentFTValue(bool substactOffset);
FTSensorValue getAverageFTValue(bool substactOffset);
void stopClear();
......
......@@ -3,7 +3,6 @@
<Proxies>
<Proxy value="RobotAPIInterfaces.debugDrawerToArVizLayerBlackWhitelist"/>
</Proxies>
<Configurations/>
<State filename="UpateLayerBlackWhitelist.xml" visibility="public"/>
</StatechartGroup>
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