autoplay.py
Go to the documentation of this file.
00001 import time
00002 import com.generalrobotix.ui.item.GrxWorldStateItem as GrxWorldStateItem
00003 import syncExec
00004 import java.lang.Runnable as Runnable
00005 
00006 class MyRunnable(Runnable):
00007         def run(self):
00008                 item.setPosition(c)
00009                 return None
00010 
00011 item  = uimanager.getSelectedItem(GrxWorldStateItem, None)
00012 n = item.getLogSize()
00013 if n > 0:
00014         print "now auto playing..."
00015 
00016         c = 0
00017         while 1:
00018                 syncExec.Exec(MyRunnable())
00019                 c = c + 100
00020                 if c > n:
00021                         c = 0
00022                 time.sleep(1)


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:43:52