1 import math, sys, time, os
7 area = [ (0.0, 0.0, -0.2), (3000.0, 2100.0, 0.2) ]
8 areasize = reduce(lambda x,y:tuple([abs(x[i])+abs(y[i]) for i in range(len(x))]) , area)
9 area_box = box(size=areasize, color=(0.0, 1.0, 0.0))
13 robot = box(pos = (0, 0, 150),
17 def set_robot(x, y, a):
19 robot.pos = (x - AREA_X/2, y - AREA_Y/2, 150)
20 robot.axis = (math.cos(a*math.pi/180) * 300,
21 math.sin(a*math.pi/180) * 300,
26 os.mkfifo("/tmp/.robot")
30 f = open("/tmp/.robot")
35 x,y,a = map(lambda x:int(x), l[:-1].split(" "))
43 scene.center = x-10,y,z
45 scene.center = x+10,y,z
47 scene.center = x,y+10,z
49 scene.center = x,y-10,z