Revision 70c54617 client/python/hlrc_client/RobotGaze.py
client/python/hlrc_client/RobotGaze.py | ||
---|---|---|
31 | 31 |
GAZETARGET_RELATIVE = 1 |
32 | 32 |
|
33 | 33 |
def __init__(self): |
34 |
self.pan = 0.0 |
|
35 |
self.tilt = 0.0 |
|
36 |
self.roll = 0.0 |
|
37 |
self.vergence = 0.0 |
|
38 |
self.pan_offset = 0.0 |
|
39 |
self.tilt_offset = 0.0 |
|
40 |
self.gaze_type = RobotGaze.GAZETARGET_ABSOLUTE |
|
41 |
self.timestamp = time.time() |
|
42 |
|
|
43 |
def __str__(self): |
|
44 |
if self.gaze_type == RobotGaze.GAZETARGET_ABSOLUTE: |
|
45 |
type_s = "ABSOLUTE" |
|
46 |
else: |
|
47 |
type_s = "RELATIVE" |
|
48 |
return "RobotGaze = { PTR={%6.2f %6.2f %6.2f} vergence=%6.2f PT_offset={%6.2f %6.2f} [%s]}" \ |
|
49 |
% (self.pan, self.tilt, self.roll, self.vergence, self.pan_offset, self.tilt_offset, type_s) |
|
50 |
|
|
34 |
self.pan = 0.0 |
|
35 |
self.tilt = 0.0 |
|
36 |
self.roll = 0.0 |
|
37 |
self.vergence = 0.0 |
|
38 |
self.pan_offset = 0.0 |
|
39 |
self.tilt_offset = 0.0 |
|
40 |
self.gaze_type = RobotGaze.GAZETARGET_ABSOLUTE |
|
41 |
self.timestamp = time.time() |
|
42 |
|
|
43 |
def __str__(self): |
|
44 |
if self.gaze_type == RobotGaze.GAZETARGET_ABSOLUTE: |
|
45 |
type_s = "ABSOLUTE" |
|
46 |
else: |
|
47 |
type_s = "RELATIVE" |
|
48 |
return "RobotGaze = { PTR={%6.2f %6.2f %6.2f} vergence=%6.2f PT_offset={%6.2f %6.2f} [%s]}" \ |
|
49 |
% (self.pan, self.tilt, self.roll, self.vergence, self.pan_offset, self.tilt_offset, type_s) |
Also available in: Unified diff