WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   animation sequence (https://forum.worldviz.com/showthread.php?t=2287)

Andy 09-29-2009 04:29 AM

animation sequence
 
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.

Code:

#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)


Jeff 10-01-2009 10:42 AM

You can freeze an animation on the last frame, for example.
Code:

female = viz.add('vcc_female.cfg', pos = [0,0,5], euler = [180,0,0])
female.execute(5, freeze = True)

Then if the second animation starts at that same point the first one stopped it should work.


All times are GMT -7. The time now is 02:51 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC