3 import static com.kuka.roboticsAPI.motionModel.BasicMotions.positionHold;
4 import static com.kuka.roboticsAPI.motionModel.BasicMotions.ptp;
6 import java.util.concurrent.TimeUnit;
7 import java.util.concurrent.TimeoutException;
9 import com.kuka.connectivity.fastRobotInterface.FRIConfiguration;
10 import com.kuka.connectivity.fastRobotInterface.FRIJointOverlay;
11 import com.kuka.connectivity.fastRobotInterface.FRISession;
12 import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
13 import com.kuka.roboticsAPI.controllerModel.Controller;
14 import com.kuka.roboticsAPI.deviceModel.LBR;
15 import com.kuka.roboticsAPI.geometricModel.CartDOF;
16 import com.kuka.roboticsAPI.motionModel.controlModeModel.CartesianImpedanceControlMode;
17 import com.kuka.roboticsAPI.motionModel.controlModeModel.JointImpedanceControlMode;
18 import com.kuka.roboticsAPI.motionModel.controlModeModel.PositionControlMode;
25 private Controller _lbrController;
27 private String _hostName;
32 _lbrController = (Controller) getContext().getControllers().toArray()[0];
33 _lbr = (LBR) _lbrController.getDevices().toArray()[0];
37 _hostName =
"192.170.10.100";
44 FRIConfiguration friConfiguration = FRIConfiguration.createRemoteConfiguration(_lbr, _hostName);
45 friConfiguration.setSendPeriodMilliSec(4);
46 FRISession friSession =
new FRISession(friConfiguration);
47 FRIJointOverlay motionOverlay =
new FRIJointOverlay(friSession);
50 friSession.await(10, TimeUnit.SECONDS);
51 }
catch (TimeoutException e) {
63 PositionControlMode controlMode =
new PositionControlMode();
66 _lbr.move(ptp(Math.toRadians(10), Math.toRadians(10), Math.toRadians(10), Math.toRadians(-90), Math.toRadians(10), Math.toRadians(10),Math.toRadians(10)));
69 _lbr.move(positionHold(controlMode, -1, TimeUnit.SECONDS).addMotionOverlay(motionOverlay));
74 _lbr.move(ptp(Math.toRadians(10), Math.toRadians(10), Math.toRadians(10), Math.toRadians(-90), Math.toRadians(10), Math.toRadians(10),Math.toRadians(10)));
86 public static void main(
final String[] args)
static void main(final String[] args)