Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Attach an object / Python Script

#1
Hello

Can you tell me if we have access to the same hand configuration parameters, from graphical mode to python programming

I encounter a problem in taking an object in python programming that I do not encounter in object mode.

Thank you in advance
Ned C.
Need-Robotics

defTCP_On(toolitem):
"""Attaches the closest object to the toolitem Htool pose,
It will also output appropriate function calls on the generated robot program (call to TCP_On)"""
toolitem.AttachClosest()
toolitem.RDK().RunMessage('Set air valve on')
toolitem.RDK().RunProgram('TCP_On()');


whilei < nparts:
# ----------- place the box i on the convegor ------
# approach to the conveyor
robot.setPoseFrame(frame_conv)
target_conv_pose = target_conv.Pose()*transl(0,0,-SIZE_BOX_Z/2)
target_conv_app = target_conv_pose*transl(0,0,-APPROACH)
robot.MoveJ(target_conv_safe)
robot.MoveJ(target_conv_app)
WaitSensor()
robot.MoveL(target_conv_pose)
TCP_On(tool)# detach an place the object in the moving reference frame of the conveyor
robot.MoveL(target_conv_app)
robot.MoveJ(target_conv_safe)


# ----------- take a part from the conveyor ------
# get the xyz position of part i
robot.setPoseFrame(frame_pallet)
part_position_i = parts_positions[i]
target_i = transl(part_position_i)*rotx(pi)
target_i_app = target_i * transl(0,0,-(APPROACH+SIZE_BOX_Z))
# approach to the pallet
robot.MoveJ(target_pallet_safe)
# get the box i
robot.MoveJ(target_i_app)
robot.MoveL (target_i)
TCP_Off(tool, frame_pallet)# attach the closest part
robot.MoveL(target_i_app)
robot.MoveJ(target_pallet_safe)

i = i +1


Messages In This Thread
Attach an object / Python Script - by- 04-06-2020, 02:27 PM
RE: Attach an object / Python Script - byJeremy- 04-07-2020, 01:45 PM
RE: Attach an object / Python Script - by- 04-07-2020, 02:28 PM
RE: Attach an object / Python Script - byJeremy- 04-08-2020, 05:39 AM
RE: Attach an object / Python Script - by- 04-08-2020, 03:01 PM
RE: Attach an object / Python Script - byJeremy- 04-08-2020, 06:46 PM
RE: Attach an object / Python Script - by- 04-09-2020, 07:27 AM



Users browsing this thread:
1 Guest(s)