7 import java.util.concurrent.TimeUnit;
9 import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
10 import static com.kuka.roboticsAPI.motionModel.BasicMotions.*;
12 import com.kuka.roboticsAPI.controllerModel.Controller;
13 import com.kuka.roboticsAPI.controllerModel.recovery.IRecovery;
14 import com.kuka.roboticsAPI.deviceModel.LBR;
15 import com.kuka.roboticsAPI.geometricModel.CartDOF;
16 import com.kuka.roboticsAPI.geometricModel.Tool;
17 import com.kuka.roboticsAPI.motionModel.controlModeModel.CartesianImpedanceControlMode;
18 import com.kuka.roboticsAPI.motionModel.controlModeModel.JointImpedanceControlMode;
38 private Controller _lbrController;
44 _lbrController = (Controller) getContext().getControllers().toArray()[0];
45 _lbr = (LBR) _lbrController.getDevices().toArray()[0];
46 gripper = getApplicationData().createFromTemplate(
"FlangeAttachment");
51 boolean useTeachModeObject =
false;
54 if(useTeachModeObject){
58 Thread tmThread =
new Thread(tm);
75 JointImpedanceControlMode mode =
new JointImpedanceControlMode(100,100,100,100,100,100,100);
76 mode.setDampingForAllJoints(0.5);
77 mode.setStiffnessForAllJoints(100);
79 while(!useTeachModeObject) {
81 _lbr.move(positionHold(mode, 10, TimeUnit.MILLISECONDS));
90 public static void main(String[] args) {
static void main(String[] args)