Can you expand a little on the implementation with the turntable. While my turntable is set and valid, how would I modify the move joints command to encapsulate the two axis of the turn table. Cobbling some code together I came up with the following 'clunky' code:
from robolink import * # RoboDK API
from robodk import * # Robot toolbox
angle = 180
layers = 10
RDK = Robolink()
# Retrieve the robot, reference frame and create a program
robot = RDK.Item('', ITEM_TYPE_ROBOT)
reference = robot.Parent()
# Create a new program
program = RDK.AddProgram('Test')
# Define a reference pose
#pos = transl(100,200,300)*rotx(pi)
# Turn Off automatic rendering (faster)
RDK.Render(False)
# Don't show instructions (faster)
program.ShowInstructions(False)
# Specify the reference frame you want to use
program.setPoseFrame(reference)
xx = (layers*360.0)/angle
x = int(xx)
newvalues = {'Speed': 200}
for i in range(x):
targetname='Target %i' % i
target=RDK.AddTarget(targetname,reference,robot)
#target.setPose(transl(0, 0, 0) * pos)
# Set the external axes
axes = [0, i*angle]
# For cartesian targets RoboDK will ignore robot joints but not external axes
all_axes = [90,0,0,0,0,-90] + axes
# Quick way to create an array:
# [0,0,0,0,0,0, ext_axis_1, ext_axis_2]
# Set the target and create a move instruction
target.setJoints(all_axes)
target.setAsJointTarget()
program.MoveJ(target)
# If you are creating a long program, this helps keeping the tree small (faster)
if i % 20 == 0:
program.ShowTargets(True)