Robot: LBR iiwa 14 R820 MF SC FLR
Software: KUKA Sunrise.OS 1.11.0.7
Flange: Medien-Flansch elektnisch
Cabinet: Sunrise Cabinet
Hello all, I've followed a handful of iiwa posts which got me to this point but I'm stuck and not sure why. My safety configuration, setup, and code are attached/below as well as active warnings (no errors). I have a 2 pole switch connected to the cabinet on the X11 port for CIB_SR.4 (using pins 7 to 8 and 16 to 17).
Problem: Running the code (automatic mode) the robot travels to the starting position and pauses at the "iiwa.move(handGuiding());" line. The switch on the back can be switched on and enabling switch on the controller press (and other combinations) with no ability to hand guide the robot. No errors are produced. After exiting the code, I am no longer able to run codes and am unable to jog in T1 mode until a reboot of the controller. This seems to be related to addition of the ESM conditions.
I read about adding a boolean global variable in the RoboticsAPI.data.xml but I am not sure how or if that is necessary.
Any suggestions would be greatly appreciated, thanks.
Code:
package application;
import javax.inject.Inject;
import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
import com.kuka.roboticsAPI.deviceModel.LBR;
import static com.kuka.roboticsAPI.motionModel.BasicMotions.*;
import static com.kuka.roboticsAPI.motionModel.HRCMotions.*;
public class HG extends RoboticsAPIApplication {
@Inject
private LBR iiwa;
@Override
public void initialize() {
iiwa = getContext().getDeviceFromType(LBR.class);
}
@Override
public void run() {
System.out.println("Starting code");
System.out.println("Change ESM State to 1");
iiwa.setESMState("1"); //E-stop ESM
iiwa.move(ptp(0,0.70,0,-0.6,0,0.5,0).setJointVelocityRel(0.1)); //More to initial starting point
iiwa.setESMState("2"); //Hand guiding device inactive
System.out.println("Start hand guiding");
iiwa.move(handGuiding());
System.out.println("Hand guiding");
iiwa.setESMState("1");
iiwa.move(ptp(getApplicationData().getFrame("/P2")));
System.out.println("End hand guiding");
}
}
Active warnings:
Position senor not referenced. (K1: A1, A2, A3, A4, A5, A6, A7)
There are deactivated rows in the PSM configuration