update 更新框架和控制细节
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
|
||||
|
||||
"""
|
||||
摄像头识别位置和角度
|
||||
"""
|
||||
class Detection_Position:
|
||||
class Position:
|
||||
def __init__(self):
|
||||
self.X = 0.0
|
||||
self.Y = 0.0
|
||||
@ -11,6 +7,23 @@ class Detection_Position:
|
||||
self.U = 0.0
|
||||
self.V = 0.0
|
||||
self.W = 0.0
|
||||
def compare(self,position):
|
||||
if self.X-position.X<position_accuracy and \
|
||||
self.Y-position.Y<position_accuracy and \
|
||||
self.Z - position.Z < position_accuracy and \
|
||||
self.U - position.U < position_accuracy and \
|
||||
self.V - position.V < position_accuracy and \
|
||||
self.W - position.W < position_accuracy:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
pass
|
||||
"""
|
||||
摄像头识别位置和角度
|
||||
"""
|
||||
class Detection_Position(Position):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def init_position(self,X,Y,Z,U,V,W):
|
||||
self.X = X
|
||||
@ -21,14 +34,9 @@ class Detection_Position:
|
||||
self.W = W
|
||||
|
||||
|
||||
class Real_Position:
|
||||
class Real_Position(Position):
|
||||
def __init__(self):
|
||||
self.X = 0.0
|
||||
self.Y = 0.0
|
||||
self.Z = 0.0
|
||||
self.U = 0.0
|
||||
self.V = 0.0
|
||||
self.W = 0.0
|
||||
super().__init__()
|
||||
|
||||
def init_position(self, X, Y, Z, U, V, W):
|
||||
self.X = X
|
||||
|
||||
@ -16,7 +16,7 @@ class DataAddress:
|
||||
self.boardIONum = ''
|
||||
self.input_n = ''
|
||||
self.output_n = ''
|
||||
self.axisNum = ''
|
||||
self.axisNum = '6'
|
||||
self.axis_n = ''
|
||||
self.world_n = ''
|
||||
self.curAlarm = ''
|
||||
|
||||
Reference in New Issue
Block a user