Skip to content
Snippets Groups Projects
Commit a731988c authored by Zhaoliang Zheng's avatar Zhaoliang Zheng
Browse files

upload the new test function

parent c7ee6140
Branches
No related merge requests found
......@@ -8,7 +8,7 @@ from constants import *
from ESP32_AT.imageTread_AT import get_AT_6DOF_info
global ml,esp_cam_on,openmv_on
ml = 0
ml = 1
esp_cam_on = 1
openmv_on = 0
seekVertDir = 1
......@@ -655,19 +655,23 @@ def get_altitude_from_AT(AT_h,ty):
def test_function():
url = 'http://192.168.0.230/cam-hi.jpg'
tid, tx, ty, tz, rx, ry, rz = get_AT_6DOF_info(url)
url_AT = 'http://10.0.0.4/cam-hi.jpg' # 6
url_gb = 'http://10.0.0.5/cam-hi.jpg' # 1
tid, tx, ty, tz, rx, ry, rz = get_AT_6DOF_info(url_AT)
gbx, gby, gb_dist = ball_detection.detectLive(url_gb, model, minDetectionScore, showSight=True)
print("testing new function")
print("-----------------------")
print("tid:{}".format(tid))
print("tx,ty,tz:{},{},{}".format(tx,ty,tz))
print("rx,ry,rz:{},{},{}".format(rx,ry,rz))
print("gbx,gby,gb_dist:{},{},{}".format(gbx,gby,gb_dist))
def test_function1():
url = 'http://192.168.0.230/cam-hi.jpg'
tid, tx, ty, tz, rx, ry, rz = get_AT_6DOF_info(url)
print("testing new function")
print("-----------------------")
print("tid:{}".format(tid))
......@@ -700,7 +704,7 @@ def manual_ballcapture(bcap_man):
if __name__ == '__main__':
# =========== SET UP ============
# Defining Variables for ESP 32 Serial I/O
PORT = "COM9" # for Alienware
PORT = "COM4" # for Alienware
serial_port = serial.Serial(PORT, 115200)
serial_port.close()
serial_port.open()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment