Discussion

Left ArrowBack to discussions page
TayoTayo Posts: 8 Apprentice
Hello DoF,

The program in the picture worked perfectly fine for me up til last week. I did not change anything but suddenly it keeps looping the MoveL inside the Camera Locate. Instead of just exiting the MoveL and bringing the object to the next waypoint inside the MoveJ.


How could I solve this problem?

Best regards,

Tayo

Comments

  • RamonSanchezRamonSanchez Posts: 14 Apprentice
    edited May 15
    Goedemorgen @Tayo
    While I am not using a camera, and I don't know specifically how it works, this is more or less the pseudocode I have used for breaking a loop of object detection with a 3-finger Robotiq gripper (I hope I am remembering it well).

    BeforeStart
    geen_product = 0

    RobotProgram
    ...
    If (checked continuously):
       if object is not located:
          open gripper
          back to original position
          geen_product = geen_product +1
          if geen_product >= 5
             pop-up
             geen_product = 0
       elseif object is located:
          break

    Movej...

    Veel succes,
    Ramón
     


  • RamonSanchezRamonSanchez Posts: 14 Apprentice
    Here you are the exact piece of code:   

     $ 17 "Loop"
        while (True):
          # begin: URCap Program Node
          #   Source: Robotiq_3-Finger_Adaptive_Gripper, 1.0.0, Robotiq inc.
          #   Type: 3F Object Detected
          $ 18 "If not 3F object detected"
          if not rq_is_object_detected():
          # begin: URCap Program Node
          #   Source: Robotiq_3-Finger_Adaptive_Gripper, 1.0.0, Robotiq inc.
          #   Type: 3F Gripper Move
          $ 19 "3F Basic Open"
          rq_set_basic()
          rq_set_force(255)
          rq_set_speed(255)
          rq_move(0)
          # end: URCap Program Node
          $ 20 "MoveL"
          $ 21 "point_1"
          movel([5.167157579968164, -0.8497353437387618, -2.200649891660926, -3.2382118260714328, -1.150528929266594, 0.7900703416475932], a=1.2, v=0.25)
          $ 22 "Popup"
          popup("Tube Absent", "Message", False, False, blocking=True)
          $ 23 "MoveL"
          $ 24 "point_2"
          movel([4.9549133369150296, -1.4438429129746275, -2.416710265018896, -2.4280072451804626, -1.367181157161772, 0.786604714658365], a=1.2, v=0.25)
          # begin: URCap Program Node
          #   Source: Robotiq_3-Finger_Adaptive_Gripper, 1.0.0, Robotiq inc.
          #   Type: 3F Gripper Move
          $ 25 "3F Basic Close"
          rq_set_basic()
          rq_set_force(255)
          rq_set_speed(255)
          rq_move_wait(255)
          # end: URCap Program Node
          end
          # end: URCap Program Node
          # begin: URCap Program Node
          #   Source: Robotiq_3-Finger_Adaptive_Gripper, 1.0.0, Robotiq inc.
          #   Type: 3F Object Detected
          $ 26 "If 3F object detected"
          if rq_is_object_detected():
          $ 27 "break"
          break
          end
          # end: URCap Program Node
        end
        $ 28 "MoveL"
  • TayoTayo Posts: 8 Apprentice
    Thank you (dankjewel) Ramón!
Sign In or Register to comment.
Left ArrowBack to discussions page