def test_collisions(): car = Car() car._vicon_client.start() time.sleep(2) print "Running..." try: car._detect_collisions() except KeyboardInterrupt: car._kill = True time.sleep(.5) print "Done"
def test_bystander(): # no collision detection car = Car() car._vicon_client.start() car._talker.start() car._message_worker.start() car._main_worker.start() try: raw_input("Running... press enter to stop\n") except KeyboardInterrupt: pass car._driver.stop() car._driver.destroy() car._kill = True car._vicon_client.stop() car._talker.stop() car._message_worker.join() car._main_worker.join() print "Done"