Revision 799ca8a7

View differences:

client/python/hlrc_client/RobotGaze.py
25 25
Excellence Initiative.
26 26
"""
27 27

  
28

  
28 29
class RobotGaze:
29
	GAZETARGET_ABSOLUTE = 0
30
	GAZETARGET_RELATIVE = 1
31

  
32
	def __init__(self):
33
		self.pan = 0.0
34
		self.tilt = 0.0
35
		self.roll = 0.0
36
		self.vergence = 0.0
37
		self.pan_offset = 0.0
38
		self.tilt_offset = 0.0
39
		self.gaze_type = RobotGaze.GAZETARGET_ABSOLUTE
40
		self.timestamp = self.now()
41
		
42
	def __str__(self):
30
    GAZETARGET_ABSOLUTE = 0
31
    GAZETARGET_RELATIVE = 1
32

  
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 = self.now()
42

  
43
    def __str__(self):
43 44
        if (self.gaze_type == RobotGaze.GAZETARGET_ABSOLUTE):
44
			type_s = "ABSOLUTE"
45
		else:
46
			type_s = "RELATIVE"
47
		return "RobotGaze = { PTR={%6.2f %6.2f %6.2f} vergence=%6.2f PT_offset={%6.2f %6.2f} [%s]}"  \
48
			% (self.pan, self.tilt,self.roll,self.vergence,self.pan_offset,self.tilt_offset,type_s)
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