March 21, 2019, 04:19:04 PM
Robotforum | Industrial Robots Community

 FRI changing stiffness in JointImpedanceControlMode

Author Topic:  FRI changing stiffness in JointImpedanceControlMode  (Read 495 times)

0 Members and 1 Guest are viewing this topic.

October 22, 2018, 03:19:29 PM
Read 495 times
Offline

g.dechambrier


I have the following code:

JointImpedanceControlMode ctrlMode = new JointImpedanceControlMode(200, 200, 200, 200, 200, 200, 200);
ctrlMode.setDampingForAllJoints(0.7);

PositionHold posHold = new PositionHold(ctrlMode, -1, null);

while(running){
  lbr.moveAsync(posHold.addMotionOverlay(jointOverlay));
}


I would like to the change the stiffness parameter of the ctrlMode. I have tried to call ctrlMode.setStiffnessForAllJoints() after the lbr.moveAsync with no effect.
I have the feeling that once lbr.moveAsync has been called it is no longer possible to change its parameters. I guess I would have to interrupt the motion somehow and start it again with new stiffness values.

Would anyone know how to interrupter the motion problematically without having to press stop on the smart pad ? Any help is much appreciated.



Today at 04:19:04 PM
Reply #1

Advertisement

Guest

October 22, 2018, 07:17:59 PM
Reply #1
Offline

NullReference


Get the execution service from the controller. The controller object can be obtained via dependency injection. Call the the canceAll() method in the execution service. Don't forget to cast the returned object from the controller, see below
Code: [Select]
SunriseExecutionServcice executionService = (SunriseExecutionServcice)myInjectedController.getExecutionService();
Also, I don't think you have to call moveAsync inside the forever loop, I believe calling it once before the loop is enough.

October 23, 2018, 02:56:07 PM
Reply #2
Offline

DrG


Hello G.dechambrier
I have tried to call ctrlMode.setStiffnessForAllJoints() after the lbr.moveAsync with no effect.
[/b]I have the feeling that once lbr.moveAsync has been called it is no longer possible to change its parameters. I guess I would have to interrupt the motion somehow and start it again with new stiffness values.


You can change the parameters of the Motion to become executed on the Robot ONLY BEFORE calling "move/moveAsync".
After "move/moveAsync" - as you already observed - there is NO consequence on the current Motion execution .


Advice/Comment on your program: Avoid calling moveAsync in an endless Loop without further synchronization. This will lead to uncool side effects.

You could do s.th. like:


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;
}


DrG

October 26, 2018, 01:27:50 PM
Reply #3
Offline

g.dechambrier


Thanks for your help guys.. I can now change both stiffness and damping parameters  (via TCP). Can now easily switch between joint impedance and gravity compensation by change these values.

 :respect:


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Joints stiffness

Started by TomSanz on General Discussion of Industrial Robots Only

0 Replies
1643 Views
Last post May 16, 2013, 03:02:02 PM
by TomSanz
xx
How to change stiffness?

Started by Roios on KUKA Robot Forum

2 Replies
1923 Views
Last post June 22, 2015, 06:00:57 PM
by MECHI
clip
mass & friction/stiffness properties of irb 120

Started by photon on ABB Robot Forum

0 Replies
1312 Views
Last post June 25, 2014, 03:49:14 AM
by photon
xx
ABB robot IRC 5 changing base frame without changing the program

Started by jpp18209 on ABB Robot Forum

3 Replies
634 Views
Last post July 18, 2018, 03:14:47 PM
by SharplesR