vehicle receives new target velocity from orchestrator as response; at this point, this velocity is just a random float between 0 and 130;
28 lines
426 B
Python
28 lines
426 B
Python
import threading
|
|
|
|
from flask import Flask
|
|
from orchestrator import Orchestrator
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route('/')
|
|
def hello_world():
|
|
return 'Hello World'
|
|
|
|
|
|
@app.route('/api1')
|
|
def api1():
|
|
return 'api1'
|
|
|
|
|
|
@app.route('/api2')
|
|
def api2():
|
|
return 'api2'
|
|
|
|
|
|
if __name__ == '__main__':
|
|
orc = Orchestrator()
|
|
threading.Thread(target=orc.setup_msg_queues).start()
|
|
threading.Thread(target=app.run).start()
|