def main():
NetworkTable.setIPAddress('10.19.37.2')
NetworkTable.setClientMode()
NetworkTable.initialize()
sd = NetworkTable.getTable('SmartDashboard')
#ms_list = []
while True:
time.sleep(0.1)
start_time = datetime.now()
# returns the elapsed milliseconds since the start of the program
vision(sd)
dt = datetime.now() - start_time
ms = (dt.days * 24 * 60 * 60 + dt.seconds) * 1000 + dt.microseconds / 1000.0
#ms_list.append(ms)
print ms
#print np.mean(ms_list)
cv2.destroyAllWindows()
评论列表
文章目录