Define tool as default

  • Hello,


    I am trying to control the KUKA LBR iiwa robot in torque command mode using the FRI, but I am having difficulty with gravity compensation due to the addition of a 1.2 kg gripper. I have created a new tool in Sunrise and can see it on the smartpad, but I am unsure of how to utilize it when controlling the robot through the FRI. Any assistance would be greatly appreciated.


    Thank you. -Max

  • AD
  • Hello,

    It been a while since I used FRI, but to include a Tool in your motion you need to do these steps:


    in the "import" section:

    Code
    import com.kuka.roboticsAPI.geometricModel.Tool;


    inside your Class variables' section:

    Code
    @Inject
     private Tool myTool;

    in initialize()


    Code
    myTool = getApplicationData().createFromTemplate("_gripper");
    myTool.attachTo(robot.getFlange());


    Then in run() instead of using


    Code
    lbr.move(ptp(startPosition).setJointVelocityRel(0.3));

    Use:


    Code
    myTool.getFrame("TCP").move(ptp(startPosition).setJointVelocityRel(0.3));


    Hope this helps

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now