Class: Argus::NavOptionVisionDetect::Detection

Inherits:
Object
  • Object
show all
Defined in:
lib/argus/nav_option_vision_detect.rb

Instance Method Summary collapse

Constructor Details

#initialize(vision_detected, index) ⇒ Detection

Returns a new instance of Detection.


26
27
28
29
# File 'lib/argus/nav_option_vision_detect.rb', line 26

def initialize(vision_detected, index)
  @vision_detected = vision_detected
  @index = index
end

Instance Method Details

#camera_sourceObject


63
64
65
# File 'lib/argus/nav_option_vision_detect.rb', line 63

def camera_source
  @vision_detected.camera_source[@index]
end

#distanceObject


55
56
57
# File 'lib/argus/nav_option_vision_detect.rb', line 55

def distance
  @vision_detected.distance[@index]
end

#heightObject


51
52
53
# File 'lib/argus/nav_option_vision_detect.rb', line 51

def height
  @vision_detected.height[@index]
end

#orientation_angleObject


59
60
61
# File 'lib/argus/nav_option_vision_detect.rb', line 59

def orientation_angle
  @vision_detected.orientation_angle[@index]
end

#typeObject


31
32
33
# File 'lib/argus/nav_option_vision_detect.rb', line 31

def type
  @vision_detected.type[@index]
end

#type_nameObject


35
36
37
# File 'lib/argus/nav_option_vision_detect.rb', line 35

def type_name
  CadType::NAMES[type]
end

#widthObject


47
48
49
# File 'lib/argus/nav_option_vision_detect.rb', line 47

def width
  @vision_detected.width[@index]
end

#xObject


39
40
41
# File 'lib/argus/nav_option_vision_detect.rb', line 39

def x
  @vision_detected.xc[@index]
end

#yObject


43
44
45
# File 'lib/argus/nav_option_vision_detect.rb', line 43

def y
  @vision_detected.yc[@index]
end