04-06-2020, 02:27 PM
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
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