Hand Guiding

September 6, 2017 | Author: Rishi | Category: N/A
Share Embed Donate


Short Description

Descripción: Hand Guiding code for Kuka IIwa...

Description

package application; import import import import import

javax.inject.Inject; com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication; static com.kuka.roboticsAPI.motionModel.BasicMotions.*; com.kuka.roboticsAPI.deviceModel.LBR; com.kuka.roboticsAPI.motionModel.HandGuidingMotion;

/** * Implementation of a robot application. * * The application provides a {@link RoboticsAPITask#initialize()} and a * {@link RoboticsAPITask#run()} method, which will be called successively in * the application lifecycle. 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. * * It is imperative to call super.dispose() when overriding the * {@link RoboticsAPITask#dispose()} method. * * @see UseRoboticsAPIContext * @see #initialize() * @see #run() * @see #dispose() */ public class Handguiding extends RoboticsAPIApplication { @Inject private LBR lBR_iiwa_7_R800_1; private HandGuidingMotion motion; @Override public void initialize() { // initialize your application here motion = new HandGuidingMotion(); motion.setAxisLimitsMax(Math.toRadians(160), Math.toRadians(40), 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); } @Override public void run() { // your application execution starts here lBR_iiwa_7_R800_1.setESMState("2"); lBR_iiwa_7_R800_1.setESMState("1"); lBR_iiwa_7_R800_1.move(motion); }

}

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF