1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Cobot Help and Discussion Center
  4. KUKA LBR IIWA
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Resume program after collision detection

  • hiimtom
  • October 10, 2017 at 7:14 AM
  • Thread is Resolved
  • hiimtom
    Reactions Received
    5
    Trophies
    3
    Posts
    19
    • October 10, 2017 at 7:14 AM
    • #1

    Hi There!

    I am working on commissioning an LBR iiwa to work collaboratively with humans.

    Collision detection via the HRC option is already active @ Max external torque: 20Nm.

    One part of the process is as follows:
    1. Robot is moving normally, operator taps the robot and the robot stops.
    2. The robot has stopped and holds its position under impedance control mode.
    3. The user 'taps' the robot again and it continues on its planned path.

    I have done this via wrapping motions in MotionContainers:

    Code
    condition = createCollisionCondition();	
    
                    IMotionContainer motion;
    		do { // motion started
    			motion = festoTool.move(ptp(myFrame).breakWhen(condition));
    			if (motion.hasFired(condition)){
    				resumeAfterCollision();
    			}
    		} while (motion.getFiredBreakConditionInfo() != null); // motion finished

    The Collision condition:

    Code
    private ICondition createCollisionCondition() {
    		double sensCLS = 5.0;
    
    
    		double actTJ1 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J1);
    		double actTJ2 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J2);
    		double actTJ3 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J3);
    		double actTJ4 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J4);
    		double actTJ5 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J5);
    		double actTJ6 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J6);
    		double actTJ7 = myLBR.getExternalTorque().getSingleTorqueValue(JointEnum.J7);
    
    
    		JointTorqueCondition jt1 = new JointTorqueCondition(JointEnum.J1, -sensCLS + actTJ1, sensCLS + actTJ1);
    		JointTorqueCondition jt2 = new JointTorqueCondition(JointEnum.J2, -sensCLS + actTJ2, sensCLS + actTJ2);
    		JointTorqueCondition jt3 = new JointTorqueCondition(JointEnum.J3, -sensCLS + actTJ3, sensCLS + actTJ3);
    		JointTorqueCondition jt4 = new JointTorqueCondition(JointEnum.J4, -sensCLS + actTJ4, sensCLS + actTJ4);
    		JointTorqueCondition jt5 = new JointTorqueCondition(JointEnum.J5, -sensCLS + actTJ5, sensCLS + actTJ5);
    		JointTorqueCondition jt6 = new JointTorqueCondition(JointEnum.J6, -sensCLS + actTJ6, sensCLS + actTJ6);
    		JointTorqueCondition jt7 = new JointTorqueCondition(JointEnum.J7, -sensCLS + actTJ7, sensCLS + actTJ7);
    
    
    		ICondition collisionCond = jt1.or(jt2, jt3, jt4, jt5, jt6, jt7);
    		return collisionCond;
    	}
    Display More
    Code
    private void resumeAfterCollision() {
    		JointTorqueCondition resumeCondition = new JointTorqueCondition(JointEnum.J1, -10, 10);
    
    
    		CartesianImpedanceControlMode soft = new CartesianImpedanceControlMode();
    		soft.parametrize(CartDOF.ALL).setDamping(.7);
    		soft.parametrize(CartDOF.ROT).setStiffness(100);
    		soft.parametrize(CartDOF.TRANSL).setStiffness(600);
    
    
    		ThreadUtil.milliSleep(1000);
    		myLBR.move(positionHold(soft, -1, TimeUnit.SECONDS).breakWhen(resumeCondition));
    	}
    Display More

    My problem is that this will only work for Single motions.
    I would like to be able to do this using Approximations motions or batch motions, however after the collision it always will return the beginning of the first motion in the block.

    Any ideas would be greatly appreciated! :help:

    cheers!!

  • razzo
    Reactions Received
    3
    Trophies
    3
    Posts
    133
    • October 12, 2017 at 6:37 PM
    • #2
    Quote

    Collision detection via the HRC option is already active @ Max external torque: 20Nm.


    Means with an PSM?
    In special the AMF 'Collision detection'?!
    See attachment. I am to stupid to insert it here.

    Do you have the option package 'HRC'?! If not it is not safe for humans.
    See attachment. I am to stupid to insert it here.

    Quote

    1. Robot is moving normally, operator taps the robot and the robot stops.


    The tap can be from any direction?! But you are defined torques on joints and not a force.
    Difference to collision detection?!
    I would prefere something like:

    Code
    ForceComponentCondition fCon = new ForceComponentCondition(World.Current.getRootFrame(), CoordinateAxis.Z, -30, 10);
    Quote

    2. The robot has stopped and holds its position under impedance control mode.


    Is there a reason why you use the impedance control mode?

    Quote

    3. The user 'taps' the robot again and it continues on its planned path.


    You current condition is to rotate the robot a little bit? Because you checke on Joint1...

    Quote

    I would like to be able to do this using Approximations motions or batch motions, however after the collision it always will return the beginning of the first motion in the block.


    Sounds like you set the breakWhen on the complete MotionBatch and not on the single motions.

    Images

    • software.jpg
      • 167.51 kB
      • 1,069 × 725
      • 96

    Files

    software.jpg_thumb 7.38 kB – 158 Downloads

    Edited once, last by razzo (October 12, 2017 at 6:45 PM).

  • hiimtom
    Reactions Received
    5
    Trophies
    3
    Posts
    19
    • October 18, 2017 at 7:48 AM
    • #3

    Hi Razzo!

    If I use a break when on an individual motion within a motion block, I am not able to approximate using moveAsync.

    This is the only issue I am having, the other information was just for background..
    HRC is installed and all other parts of the robot program are exactly how I want them.

    My only issue is trying to approximate motions while still monitoring for a collision..

    Cheers for the response!

  • kiiwa
    Reactions Received
    9
    Trophies
    4
    Posts
    369
    • October 20, 2017 at 3:57 PM
    • #4

    You can use this

    Code
    getApplicationControl().setApplicationOverride(0);


    when you detect a human contact, so the robot stands still, and when you want it to get back moving, just use this

    Code
    getApplicationControl().setApplicationOverride(1);


    when you touch it again.

  • hiimtom
    Reactions Received
    5
    Trophies
    3
    Posts
    19
    • November 9, 2017 at 2:02 AM
    • #5

    Hi Kiiwa!

    Thanks for that response.

    However I do not believe I can use this as it will not work with approximated motions.

    do you know if there is a way to change Override in the background task?

  • razzo
    Reactions Received
    3
    Trophies
    3
    Posts
    133
    • November 10, 2017 at 3:35 PM
    • #6

    you could try to inject IApplicationOverrideControl

    Code
    @Inject
    private IApplicationOverrideControl oc;

    And then set the value with your ProcessData or something else which should be done with something like this:

    Code
    oc.setApplicationOverride((Double) getApplicationData().getProcessData("myAppOverRide").getValue());

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download