Hey Marhy,
First, run PositionAndGMSReferencing in AUT to get rid of any position/torque related referencing errors. When in AUT, with the PositionAndGMSReferencing program selected, press the Hand Guiding enabling switch until the run symbol on the SmartPAD illuminates.
https://www.robot-forum.com/ro…4-r820/msg82896/#msg82896
Try looking through this forum post; this is how I got hand guiding to work for the first time, mind you, without a Media Flange designed for hand guiding. A couple things you can try:
1) Try to perform hand guiding in T1 Frames view
2) Write a test program that has a call to robot.move(HandGuidingMotion motion)
- I've attached a good test program to try and it should hopefully help you understand the configuration a little better
- ESM States attached below.
3) Switch your handguiding enabled/disabled ESM states (maybe you configured them in the wrong order?)
Try these out if you can, and if you're still having trouble some helpful things to include would be snippets of test code or any diagrams to help describe the problem.
Let us know if this helps!
-Alex
import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
import com.kuka.roboticsAPI.controllerModel.Controller;
import com.kuka.roboticsAPI.deviceModel.LBR;
import com.kuka.roboticsAPI.geometricModel.Workpiece;
import com.kuka.roboticsAPI.motionModel.HandGuidingMotion;
import static com.kuka.roboticsAPI.motionModel.BasicMotions.ptp;
/**
* Implementation of a robot application.
* <p>
* The application provides a {@link RoboticsAPITask#initialize()} and a
* {@link RoboticsAPITask#run()} method, which will be called successively in
* the application life cycle. The application will terminate automatically after
* the {@link RoboticsAPITask#run()} method has finished or after stopping the
* task. The {@link RoboticsAPITask#dispose()} method will be called, even if an
* exception is thrown during initialization or run.
* <p>
* <b>It is imperative to call <code>super.dispose()</code> when overriding the
* {@link RoboticsAPITask#dispose()} method.</b>
*
* @see #initialize()
* @see #run()
* @see #dispose()
*/
public class HandGuidance extends RoboticsAPIApplication {
private Controller kuka_Sunrise_Cabinet_1;
private LBR robot;
private HandGuidingMotion motion;
public void initialize() {
kuka_Sunrise_Cabinet_1 = getController("KUKA_Sunrise_Cabinet_1");
robot = (LBR) getRobot(kuka_Sunrise_Cabinet_1,
"LBR_iiwa_7_R800_1");
// decalare paramerters for the handguiding motion, to avoid Singularities and axes limits
motion = new HandGuidingMotion();
motion.setAxisLimitsMax(Math.toRadians(160), Math.toRadians(60), Math.toRadians(30),
Math.toRadians(-5), Math.toRadians(65), Math.toRadians(90), Math.toRadians(55))
.setAxisLimitsMin(Math.toRadians(-160), Math.toRadians(-10), Math.toRadians(-30),
Math.toRadians(-110), Math.toRadians(-95),Math.toRadians(-90), Math.toRadians(-55))
.setAxisLimitsEnabled(true, true, true, true, true,true, true)
.setAxisLimitViolationFreezesAll(false)
.setPermanentPullOnViolationAtStart(true);
}
public void run()
{
robot.setESMState("2"); // sets controller to monitor collisions and high velocity
robot.move(ptp(0, Math.toRadians(20), 0, Math.toRadians(-90), 0,
Math.toRadians(-20), 0).setJointVelocityRel(0.2));
getLogger().info("ESM State monitoring Hand Guiding");
robot.setESMState("1"); // controller will only monitor the handguiding switch
robot.move(motion);
getLogger().info("ESM State monitoring High Velocity and Collision Detection");
robot.setESMState("2"); // return to previous monitoring
robot.move(ptp(0, Math.toRadians(20), 0, Math.toRadians(-90), 0,
Math.toRadians(-20), 0).setJointVelocityRel(0.2));
}
/**
* Auto-generated method stub. Do not modify the contents of this method.
*/
public static void main(String[] args) {
HandGuidance app = new HandGuidance();
app.runApplication();
}
}
Display More