Discussion

Left ArrowBack to discussions page
Etienne_SamsonEtienne_Samson Posts: 356 Handy
edited August 2016 in Robotiq Products
For this challenge you need to pick & package parts with labels and weights.

Provided material :
  • 4 blue containers all identified (1 item each)
  • 1 black puck of 6oz = 170g

  • 1 blue puck of 4oz = 113g

  • 1 Robotiq Box

  • 1 UR Box

  • 1 Robotiq Sticker
  • 1 UR Sticker
Goal : Place each item in the appropriate container.

Hint 1: The blue and black pucks can only be identified by weight. Maybe try using moments? ;)

Hint 2: The boxes can only be identified by their labels, you will need to proceed in two steps.

Good luck !
Etienne Samson
Technical Support Manager - Responsable soutien technique
+01 418-380-2788 ext. 207
esamson@robotiq.com

Comments

  • Cody_JamesCody_James Posts: 5Partner Apprentice
    edited August 2016
    Team 1 challenge complete.



    Here is the code and program in zip file
    Program
       Init Variables
       BeforeStart
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
         Script: accessor_capt.script
         Fx≔0.0
         Fy≔0.0
         Fz≔0.0
         Mx≔0.0
         My≔0.0
         Mz≔0.0
         Fz_max≔15
         Fz_tolerance≔2.5
         x_increment≔0.002
         z_increment≔0.0005
       Robot Program
         rq_set_zero()
         Gripper Open
         MoveJ
           home
         Camera Locate
           MoveL
             Robo_Approach
             Robo_Pick
             Gripper Close
             Robo_Exit
           MoveJ
             Waypoint_1
             Gripper Open
             home
         Camera Locate
           MoveL
             UR_Approach
             UR_Pick
             Gripper Close
             UR_Approach
           MoveJ
             Waypoint_2
             Gripper Open
             home
         'Call '
       push_z_axis
         Loop norm(Fz)<Fz_max
           position_increm≔Tool
           position_increm[2] = position_increm[2]-z_increment
           movel(position_increm,1.2,0.01,0,0.0001)
       Thread_1
         Script: sensor_thread.script_bak
    


  • Ryan_WeaverRyan_Weaver Posts: 42Founding Pro, Partner, Beta Tester VIsion 1.1 Program Handy
    edited August 2016
    Team 3 complete!


    Here is the code
    Program
       Init Variables
       BeforeStart
         Script: accessor_capt.script
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
         var_1≔get_actual_tcp_pose()
         MoveJ
           var_1
       Robot Program
         Loop
           'Write robot program here.'
           Call Task_3
           Wait: 0.01
       Thread_1
         sensor_data≔socket_read_ascii_float(6,"stream")
         If sensor_data[0] ≥6
           Fx≔sensor_data[1]
           Fy≔sensor_data[2]
           Fz≔sensor_data[3]
           Mx≔sensor_data[4]
           My≔sensor_data[5]
           Mz≔sensor_data[6]
         Else
           Fx≔0.0
           Fy≔0.0
           Fz≔0.0
           Mx≔0.0
           My≔0.0
           Mz≔0.0
       SubP_rq_set_zero
         rq_set_zero()
       SubP_rq_print_firmware_version
         rq_print_firmware_version()
       SubP_rq_print_prod_year
         rq_print_prod_year()
       SubP_rq_print_serial_number
         rq_print_serial_number()
       SubP_rq_print_version
         rq_get_version()
       Task_3
         Gripper Open
         MoveJ
           Waypoint_1
         Camera Locate
           MoveL
             Waypoint_2
             Waypoint_3
             Gripper Close
             Waypoint_2
           MoveJ
             Waypoint_4
             Waypoint_5
             Gripper Open
         sync()
         MoveJ
           Waypoint_1
         Camera Locate
           MoveL
             Waypoint_6
             Waypoint_7
             Gripper Close
             Waypoint_6
           MoveJ
             Waypoint_8
             Waypoint_9
             Gripper Open
         sync()
         MoveJ
           Waypoint_1
         Camera Locate
           MoveL
             Waypoint_11
             Waypoint_10
             Gripper Close
             Waypoint_11
           MoveJ
             Waypoint_12
             Wait: 2.0
           If Mx<-.2
             MoveJ
               Waypoint_13
               Waypoint_14
               Gripper Open
           Else
             MoveJ
               Waypoint_15
               Waypoint_16
               Gripper Open
    



    Ryan Weaver   |   Automation Engineer   |   Axis New England
    rweaver@axisne.com
    https://www.youtube.com/user/AxisNewEngland
    https://twitter.com/axis_newengland

  • Etienne_SamsonEtienne_Samson Posts: 356 Handy
    Awesome job guys!
    Etienne Samson
    Technical Support Manager - Responsable soutien technique
    +01 418-380-2788 ext. 207
    esamson@robotiq.com
  • EnricEnric Posts: 79Founding Pro, Partner, Beta Tester VIsion 1.1 Program, Beta Tester Multi Gripper, Beta Tester Camera URCap 1.2.0-beta Handy
    edited August 2016
    Team4 @Nicolas @Juanjo @Enric ;@Adam529dp

    Latest solution to auto-focus failure. ;)



    Here is the code 
    Program
       Init Variables
       BeforeStart
         Script: accessor_capt.script
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
         'Gripper Open'
         Maxim≔0.5
         Gripper Open
         rq_set_zero()
       Robot Program
         MoveJ
           Waypoint_6
         Camera Locate
           MoveL
             Waypoint_2
             Waypoint_3
             Gripper Close
           MoveJ
             Waypoint_2
             Waypoint_1
             Wait: 1.0
             var_1≔Mx
             var_2≔Mx
             var_3≔Mx
             If (var_2+var_1+var_3)<-.6
               MoveJ
                 Waypoint_4
                 Gripper Open
             Else
               MoveJ
                 Waypoint_5
                 Gripper Open
         'Folder Robotiq'
         Folder Ur
           MoveJ
             Waypoint_70
           Camera Locate
             MoveL
               Waypoint_13
               Waypoint_12
               Gripper Close
               Waypoint_14
             MoveJ
               Waypoint_11
               Gripper Open
       Thread_1
         sensor_data≔socket_read_ascii_float(6,"stream")
         If sensor_data[0] ≥6
           Fx≔sensor_data[1]
           Fy≔sensor_data[2]
           Fz≔sensor_data[3]
           Mx≔sensor_data[4]
           My≔sensor_data[5]
           Mz≔sensor_data[6]
         Else
           Fx≔0.0
           Fy≔0.0
           Fz≔0.0
           Mx≔0.0
           My≔0.0
           Mz≔0.0
         sync()
       SubP_rq_set_zero
         rq_set_zero()
       SubP_rq_print_firmware_version
         rq_print_firmware_version()
       SubP_rq_print_prod_year
         rq_print_prod_year()
       SubP_rq_print_serial_number
         rq_print_serial_number()
       SubP_rq_print_version
         rq_get_version()
    


    Enric Vila Avila
    Vicosystems S.L.L.
    Industrial Collaborative Systems

    evila@vicosystems.com

    twitter  linkedIn  YouTube  Google
  • Etienne_SamsonEtienne_Samson Posts: 356 Handy
    @Enric that object is too tall, you should drink it!
    Etienne Samson
    Technical Support Manager - Responsable soutien technique
    +01 418-380-2788 ext. 207
    esamson@robotiq.com
  • Alexandre_PareAlexandre_Pare Posts: 56 Crew
    @Johnson_Liu , @olivertan , @eric
    Hey team 5, where is our video and code, you did good on this one!

    Alexandre Pare, Eng.
    Application Engineer
    Robotiq
    alexandre.pare@robotiq.com
  • Johnson_LiuJohnson_Liu Posts: 10Founding Pro Handy
    edited August 2016
    Team 5. There you go @Alexandre_Pare







    Here is the code
    Program
       Init Variables
       BeforeStart
         Script: accessor_capt.script
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
         rq_activate_and_wait()
       Robot Program
         Call SubP_group5p3su
       Thread_1
         sensor_data≔socket_read_ascii_float(6,"stream")
         If sensor_data[0] ≥6
           Fx≔sensor_data[1]
           Fy≔sensor_data[2]
           Fz≔sensor_data[3]
           Mx≔sensor_data[4]
           My≔sensor_data[5]
           Mz≔sensor_data[6]
         Else
           Fx≔0.0
           Fy≔0.0
           Fz≔0.0
           Mx≔0.0
           My≔0.0
           Mz≔0.0
       SubP_group5p3su
         Gripper Open
         MoveJ
           snapshot_pos_1
         Camera Locate
           MoveL
             prepick1
             pick1
             Gripper Close
             prepick1
           MoveJ
             preplace1
             place1
             Gripper Open
             preplace1
         MoveJ
           snapshot_pos_2
         Camera Locate
           MoveL
             prepick2
             pick2
             Gripper Close
             prepick2
           MoveJ
             preplace2
             place2
             Gripper Open
             preplace2
         MoveJ
           snapshot_pos_3
         Camera Locate
           MoveL
             app3
             pick3
             Gripper Close
             app3
           MoveJ
             preplace
             measure
             Wait: 4.0
             If Mx≥-.28
               MoveL
                 app_puck4
                 puck4
                 Gripper Open
             Else
               MoveL
                 app_puck6
                 puck6
                 Gripper Open
       SubP_rq_set_zero
         rq_set_zero()
       SubP_rq_print_firmware_version
         rq_print_firmware_version()
       SubP_rq_print_prod_year
         rq_print_prod_year()
       SubP_rq_print_serial_number
         rq_print_serial_number()
       SubP_rq_print_version
         rq_get_version()
    


  • Tyler_BerrymanTyler_Berryman Posts: 115 Handy
    Here is what team 2 did. However, we did not use vision for this challenge

    Code:
     Program
       Init Variables
       BeforeStart
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
         Script: accessor_capt.script
         rq_set_zero()
         Fx≔0.0
         Fy≔0.0
         Fz≔0.0
         Mx≔0.0
         My≔0.0
         Mz≔0.0
         Fmax≔30
         Mmax≔0.5
       Robot Program
         MoveJ
           home
         Gripper Open
         Path
         Gripper Close
         Path
         Wait: 30.0
         If norm(Mx)<0.2
           MoveJ
             Waypoint_1
             Waypoint_2
             Gripper Open
         Else
           MoveJ
             Waypoint_3
             Waypoint_4
             Gripper Open
         'textmsg("Force after contact = ", Fz)'
         'Wait: 1.0'
         'textmsg("Force 1 sec later = ", Fz)'
       Thread_1
         Script: sensor_thread.script
       push_z_axis
         Loop norm(Mx)<Mmax
           position_increm≔Tool
           position_increm[1] = position_increm[1]+.001
           movel(position_increm,1.2,0.005,0,0.0001)

  • Etienne_SamsonEtienne_Samson Posts: 356 Handy
    Here is how we did it at Robotiq. Note that we decided to put a wait of 5 seconds after picking the pucks to let the robot measure accurately in a stable position the moment caused by the weight of the puck.



    Here is the code:
    Program
       Init Variables
       BeforeStart
         Script: accessor_capt.script
         socket_close("stream")
         socket_open("127.0.0.1",63351,"stream")
       Robot Program
         MoveJ
           Waypoint_1
           Gripper Open
           var_1≔0
           var_2≔0
           var_3≔0
         Loop
           If var_1≟0
             Camera Locate
               MoveL
                 Waypoint_2
                 Waypoint_3
                 Gripper Close
                 Waypoint_4
                 If rq_is_object_detected()== True 
                   MoveJ
                     Waypoint_5
                     Waypoint_6
                     Gripper Open
                     Waypoint_7
                     var_1≔1
                 MoveJ
                   Waypoint_1
                   Gripper Open
           If var_2≟0
             Camera Locate
               MoveL
                 Waypoint_8
                 Waypoint_9
                 Gripper Close
                 Waypoint_10
                 If rq_is_object_detected()== True 
                   MoveJ
                     Waypoint_12
                     Waypoint_11
                     Gripper Open
                     Waypoint_13
                     var_2≔1
             MoveJ
               Waypoint_1
               Gripper Open
           If var_3<2
             Camera Locate
               MoveL
                 Waypoint_16
                 Waypoint_14
                 Gripper Close
                 Waypoint_15
                 If rq_is_object_detected()== True 
                   MoveJ
                     Waypoint_20
                     Wait: 5.0
                   If Mx≤-0.25
                     MoveJ
                       Waypoint_18
                       Waypoint_17
                       Gripper Open
                       Waypoint_19
                       var_3≔var_3+1
                   Else
                     MoveJ
                       Waypoint_22
                       Waypoint_21
                       Gripper Open
                       Waypoint_23
                       var_3≔var_3+1
                 MoveJ
                   Waypoint_1
                   Gripper Open
           If var_1≟1 and var_2≟1 and var_3≟2
             Halt
           Wait: 0.01
       Thread_1
         sensor_data≔socket_read_ascii_float(6,"stream")
         If sensor_data[0] ≥6
           Fx≔sensor_data[1]
           Fy≔sensor_data[2]
           Fz≔sensor_data[3]
           Mx≔sensor_data[4]
           My≔sensor_data[5]
           Mz≔sensor_data[6]
         Else
           Fx≔0.0
           Fy≔0.0
           Fz≔0.0
           Mx≔0.0
           My≔0.0
           Mz≔0.0
       SubP_rq_set_zero
         rq_set_zero()
       SubP_rq_print_firmware_version
         rq_print_firmware_version()
       SubP_rq_print_prod_year
         rq_print_prod_year()
       SubP_rq_print_serial_number
         rq_print_serial_number()
       SubP_rq_print_version
         rq_get_version()
    


    Etienne Samson
    Technical Support Manager - Responsable soutien technique
    +01 418-380-2788 ext. 207
    esamson@robotiq.com
Sign In or Register to comment.
Left ArrowBack to discussions page