def main(): """App entry point.""" # Always take Apollo home as working directory. os.chdir(os.path.join(os.path.dirname(__file__), '../../..')) conf = Config.get_pb() # Module initialization. RuntimeStatus.reset(True) RosBridgeApi.init_ros() # Start web server. kwargs = {} https = conf.server.https if https.enabled: # See https://docs.python.org/2/library/ssl.html#ssl.wrap_socket kwargs = { 'server_side': True, 'ssl_version': ssl.PROTOCOL_TLSv1, 'keyfile': https.server_key, 'certfile': https.server_cert } if https.client_cert_required: kwargs['cert_reqs'] = ssl.CERT_REQUIRED return handlers.socketio.run(handlers.app, host=conf.server.binding_ip, port=conf.server.port, **kwargs)
def reset_all(cls): """SocketIO Api: reset_all()""" ModuleApi.stop('all') RuntimeStatus.reset() cls.__exec_bash_tool('stop_player') cls.__exec_bash_tool('stop_recording') RuntimeStatus.broadcast_status_if_changed()
def main(argv): """App entry point.""" conf = Config.get_pb() # Module initialization. RuntimeStatus.reset(True) RosBridgeApi.init_ros() # Start web server. kwargs = {} https = conf.server.https if https.enabled: # See https://docs.python.org/2/library/ssl.html#ssl.wrap_socket kwargs = { 'server_side': True, 'ssl_version': ssl.PROTOCOL_TLSv1, 'keyfile': Config.get_realpath(https.server_key), 'certfile': Config.get_realpath(https.server_cert) } if https.client_cert_required: kwargs['cert_reqs'] = ssl.CERT_REQUIRED return handlers.socketio.run(handlers.app, host=conf.server.binding_ip, port=conf.server.port, **kwargs)