Revision 3877047d client/python/test.py
client/python/test.py | ||
---|---|---|
32 | 32 |
import sys |
33 | 33 |
|
34 | 34 |
if __name__ == "__main__": |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
r = RobotController("ROS", "/flobi", logging.DEBUG) |
|
39 |
|
|
40 |
|
|
41 |
r.set_current_emotion(RobotEmotion(RobotEmotion.SAD)) |
|
42 |
r.set_head_animation(RobotAnimation(RobotAnimation.HEAD_SHAKE)) |
|
43 |
r.set_speak("test 123") |
|
44 |
|
|
45 |
g = RobotGaze() |
|
46 |
g.gaze_type = RobotGaze.GAZETARGET_ABSOLUTE |
|
47 |
|
|
48 |
m = RobotMouth() |
|
49 |
m.position_center = 10.0 |
|
50 |
m.opening_center = 15.0 |
|
51 |
r.set_mouth_target(m) |
|
52 |
|
|
53 |
while(True): |
|
54 |
g.timestamp = time.time() |
|
55 |
g.pan = g.pan + 5.0; |
|
56 |
if (g.pan > 20.0): |
|
57 |
g.pan = -20.0 |
|
58 |
r.set_gaze_target(g) |
|
59 |
time.sleep(1) |
|
60 |
#e = RobotAnimation() |
|
61 |
#print e |
|
62 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
r = RobotController("ROS", "/flobi", logging.DEBUG) |
|
39 |
|
|
40 |
|
|
41 |
r.set_current_emotion(RobotEmotion(RobotEmotion.SAD)) |
|
42 |
r.set_head_animation(RobotAnimation(RobotAnimation.HEAD_SHAKE)) |
|
43 |
r.set_speak("test 123") |
|
44 |
|
|
45 |
g = RobotGaze() |
|
46 |
g.gaze_type = RobotGaze.GAZETARGET_ABSOLUTE |
|
47 |
|
|
48 |
m = RobotMouth() |
|
49 |
m.position_center = 10.0 |
|
50 |
m.opening_center = 15.0 |
|
51 |
r.set_mouth_target(m) |
|
52 |
|
|
53 |
while(True): |
|
54 |
g.timestamp = time.time() |
|
55 |
g.pan = g.pan + 5.0; |
|
56 |
if (g.pan > 20.0): |
|
57 |
g.pan = -20.0 |
|
58 |
r.set_gaze_target(g) |
|
59 |
time.sleep(1) |
|
60 |
#e = RobotAnimation() |
|
61 |
#print e |
|
62 |
|
Also available in: Unified diff