added DNDEBUG to the clang compilations to remove assertions refactor the cmu-sod test client requests added fibonacci app to cmu-sodmaster
parent
50fd8c4853
commit
5f86707403
@ -0,0 +1,32 @@
|
||||
# import numpy as np
|
||||
import requests
|
||||
import threading
|
||||
import time
|
||||
|
||||
from flask import Flask, Response
|
||||
|
||||
url = 'http://arena0.andrew.cmu.edu:10000/depth_to_xyz'
|
||||
|
||||
# app = Flask(__name__)
|
||||
|
||||
img = None
|
||||
|
||||
def get_img():
|
||||
global img
|
||||
while True:
|
||||
print("start")
|
||||
try:
|
||||
payload = open('0_depth.png', 'rb')
|
||||
response = requests.post(url, data=payload)
|
||||
img = response.content
|
||||
print("got img")
|
||||
time.sleep(0.01)
|
||||
except:
|
||||
print("failed")
|
||||
time.sleep(5)
|
||||
|
||||
thread = threading.Thread(target=get_img)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
|
Loading…
Reference in new issue