Hi,
I am controlling a KUKA LBR iiwa 14 R820 through FRI in joint impedance control.
Since the impedance parameters are hard-coded on the server side I was wondering how to change stiffness and damping on-line from the Client side.
I came across this bit of code in this forum:
JointImpedanceControlMode ctrlMode = new JointImpedanceControlMode(200, 200, 200, 200, 200, 200, 200);
ctrlMode.setDampingForAllJoints(0.7);
PositionHold posHold = new PositionHold(ctrlMode, -1, null);
/* Keep the motionContainer for later cancel */
IMotionContainer motionContainer=lbr.moveAsync(posHold.addMotionOverlay(jointOverlay));
while (running) {
/* Wait on e.g. an external Event to Change the Parameters */
ctrlMode=blockingWaitOnChangeRequestForStiffnessParameters();
/* Exchange the Parameters on the positionHold Motion Command */
posHold.setMode();
/* send to the realtime System */
IMotionContainer motionContainerNew=lbr.moveAsync(posHold.addMotionOverlay(jointOverlay));
/* Kill the old Motion - from that Point on, the new CTRL-Setting is actively executed */
motionContainer.cancel();
motionContainer=motionContainerNew;
}
Display More
But I do not understand how "blockingWaitOnChangeRequestForStiffnessParameters" is implemented.
In particular, I don't understand how impedance paramters are sent through FRI since the data that can be exchanged is quite limited (e.g. https://github.com/hariharan82…Kuka-IIWA/friLBRCommand.h) - only joint pos, wrench at endeffector or joint torques.
Are you actually sending the parameters using the 10 IO ports that seems to be configurable from WorkVisual?
Am I missing something here?
Thanks for your help!