Andy
09-29-2009, 04:29 AM
If I have a node3d object and call an animation state, is it possible to stop the action on the last position and start a new action state on this position (like a sequence of animations)?
I my application I would like to move a robotic gripper in a close position and open position.
#add robiGrip - default position is closed
robiGrip = viz.add("gripper.cfg")
def onkeydown(key):
if key == 'o':
print 'open'
robiGrip.setAnimationSpeed(0,1)
robiGrip.state(1)
elif key == 'c':
print 'close'
robiGrip.setAnimationSpeed(0,1)
robiGrip.state(2)
elif key == 'p':
print 'pause'
robiGrip.setAnimationSpeed(0,0)
elif key == 'r'
print 'resume'
robiGrip.setAnimationSpeed(0,1)
I my application I would like to move a robotic gripper in a close position and open position.
#add robiGrip - default position is closed
robiGrip = viz.add("gripper.cfg")
def onkeydown(key):
if key == 'o':
print 'open'
robiGrip.setAnimationSpeed(0,1)
robiGrip.state(1)
elif key == 'c':
print 'close'
robiGrip.setAnimationSpeed(0,1)
robiGrip.state(2)
elif key == 'p':
print 'pause'
robiGrip.setAnimationSpeed(0,0)
elif key == 'r'
print 'resume'
robiGrip.setAnimationSpeed(0,1)