コード例 #1
0
  def setUp(self):
    self.processes = []
    # We want to make sure that carla_sim docker isn't still running.
    subprocess.run("docker rm -f carla_sim", shell=True, stderr=subprocess.PIPE, check=False)

    self.carla_process = subprocess.Popen(".././start_carla.sh")
    # Too many lagging messages in bridge.py can cause a crash. This prevents it.
    unblock_stdout()
    # Wait 10 seconds to startup carla
    time.sleep(10)
コード例 #2
0
    try:
        manager_thread()
    except Exception:
        traceback.print_exc()
        crash.capture_exception()
    finally:
        manager_cleanup()

    if Params().get_bool("DoUninstall"):
        cloudlog.warning("uninstalling")
        HARDWARE.uninstall()


if __name__ == "__main__":
    unblock_stdout()

    try:
        main()
    except Exception:
        add_file_handler(cloudlog)
        cloudlog.exception("Manager failed to start")

        # Show last 3 lines of traceback
        error = traceback.format_exc(-3)
        error = "Manager failed to start\n\n" + error
        with TextWindow(error) as t:
            t.wait_for_exit()

        raise