Startup
This commit is contained in:
@@ -38,6 +38,10 @@ from cam_server.start_camera_server import start_camera_server
|
||||
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# Pipeline Utilities
|
||||
###################################################################################################
|
||||
|
||||
camera_client = CamClient("http://" + App.getArgumentValue("cam_srv_url"))
|
||||
|
||||
class Namespace(object):
|
||||
@@ -108,6 +112,10 @@ def dont_exit(status):
|
||||
sys.exit = dont_exit
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# Current pipeline handling
|
||||
###################################################################################################
|
||||
|
||||
PIPELINE_DEFAULT_PORT = 5005
|
||||
pipeline_stop_event = None
|
||||
pipeline_queue = None
|
||||
@@ -162,6 +170,21 @@ def get_pipeline_msg():
|
||||
raise Exception("Received None message.")
|
||||
return data.data
|
||||
|
||||
|
||||
###################################################################################################
|
||||
# Image rendering
|
||||
###################################################################################################
|
||||
|
||||
def start_viewer(host="localhost", port = PIPELINE_DEFAULT_PORT):
|
||||
viewer.show_stream("tcp://" + str(host) + ":" + str(port))
|
||||
|
||||
|
||||
def stop_viewer():
|
||||
viewer.stop()
|
||||
|
||||
###################################################################################################
|
||||
# Callbacks
|
||||
###################################################################################################
|
||||
def on_system_restart():
|
||||
print ("restart")
|
||||
stop_pipeline()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
viewer.show_stream("tcp://localhost:" + str(PIPELINE_DEFAULT_PORT))
|
||||
start_viewer()
|
||||
pipeline_config = PipelineConfig("test_pipeline", parameters={"camera_name": "simulation", "function":"transparent"})
|
||||
start_pipeline("test_pipeline", {"camera_name": "simulation", "function":"transparent"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user