#NEWLINE# def __init__( self , render = True , realtime = True , ip = '127.0.0.1' , port = '21560' ) : #NEWLINE# #INDENT# self . render = render #NEWLINE# if self . render : #NEWLINE# #INDENT# self . updateDone = True #NEWLINE# self . updateLock = threading . Lock ( ) #NEWLINE# self . server = UDPServer ( ip , port ) #NEWLINE# #UNINDENT# self . actLen = 12 #NEWLINE# self . mySensors = sensors . Sensors ( [ 'EdgesReal' ] ) #NEWLINE# self . dists = array ( [ 20.0 , ( sqrt ( 2.0 ) * 20 ) , ( sqrt ( 3.0 ) * 20 ) ] ) #NEWLINE# self . gravVect = array ( [ 0.0 , ( - 100.0 ) , 0.0 ] ) #NEWLINE# self . centerOfGrav = zeros ( ( 1 , 3 ) , float ) #NEWLINE# self . pos = ones ( ( 8 , 3 ) , float ) #NEWLINE# self . vel = zeros ( ( 8 , 3 ) , float ) #NEWLINE# self . SpringM = ones ( ( 8 , 8 ) , float ) #NEWLINE# self . d = 60.0 #NEWLINE# self . dt = 0.02 #NEWLINE# self . startHight = 10.0 #NEWLINE# self . dumping = 0.4 #NEWLINE# self . fraktMin = 0.7 #NEWLINE# self . fraktMax = 1.3 #NEWLINE# self . minAkt = ( self . dists [ 0 ] * ip . fraktMin ) #NEWLINE# self . maxAkt = ( self . dists [ 0 ] * self . fraktMax ) #NEWLINE# self . reset ( ) #NEWLINE# self . count = 0 #NEWLINE# self . setEdges ( ) #NEWLINE# self . act ( array ( ( [ 20.0 ] * 12 ) ) ) #NEWLINE# self . euler ( ) #NEWLINE# self . realtime = realtime #NEWLINE# self . step = 0