Hi Jeremy.
Perhaps you can shed some light on my current issue. In essence I am trying to use Python to create a station program to do something similar to what has been previously discussed:
At present the program works fine, bar the fact that the grinder tool (a tool attached to the robot) is not shown, nor is the grinder tool (an object attached to the tool stand) hidden. How does one associate an item .setVisible instruction with a program? When doing this via the RoboDK GUI I would use a simulation event - not quite sure how to do the same thing here...
Perhaps you can shed some light on my current issue. In essence I am trying to use Python to create a station program to do something similar to what has been previously discussed:
Code:
def add_grinder_attach_program():
grinder_tool_attach = RDK.AddProgram('Grinder Tool Attach')
grinder_tool_attach。setPoseFrame(RDK.Item('Grinder Tool Top', ITEM_TYPE_FRAME))
grinder_tool_attach。setPoseTool(RDK.Item('Master Tool', ITEM_TYPE_TOOL))
grinder_tool_attach。MoveJ(RDK.Item('Grinder Tool Approach', ITEM_TYPE_TARGET))
grinder_tool_attach。MoveL(RDK.Item('Grinder Tool Aligned', ITEM_TYPE_TARGET))
grinder_tool_attach。MoveL(RDK.Item('Grinder Tool Inserted', ITEM_TYPE_TARGET))
grinder_tool_attach。setDO(ATTACH_TOOL, 1)
grinder_tool_attach。Pause(500)
grinder_tool_attach。MoveL(RDK.Item('Grinder Tool Mated', ITEM_TYPE_TARGET))
grinder_tool = RDK.Item('Grinder Tool', ITEM_TYPE_TOOL)
grinder_tool.setVisible(True, True)
grinder_tool = RDK.Item('Grinder Tool', ITEM_TYPE_OBJECT)
grinder_tool.setVisible(False)
grinder_tool_attach。MoveL(RDK.Item('Grinder Tool Aligned', ITEM_TYPE_TARGET))
grinder_tool_attach。MoveJ(RDK.Item('Grinder Tool Approach', ITEM_TYPE_TARGET))
grinder_tool_attach。setPoseTool(RDK.Item('Grinder Tool', ITEM_TYPE_TOOL))
grinder_tool_attach。setPoseFrame(RDK.Item('UR5 2014350238 Base', ITEM_TYPE_FRAME))
return
At present the program works fine, bar the fact that the grinder tool (a tool attached to the robot) is not shown, nor is the grinder tool (an object attached to the tool stand) hidden. How does one associate an item .setVisible instruction with a program? When doing this via the RoboDK GUI I would use a simulation event - not quite sure how to do the same thing here...