def rgt(): cont = True current_target = Target() current_target.local_velocity = (current_target.local_velocity[0], speed_linear) data = pickle.dumps(current_target) clientsocket.send(data)
def bck(): cont = True current_target = Target() current_target.local_velocity = (-speed_linear, current_target.local_velocity[1]) data = pickle.dumps(current_target) clientsocket.send(data)
sleep(2) if server.command_reset_localisation(expect_response=True, log=True): print("T - Localisation Reset") else: print("T - Localisation Reset Failed") sleep(2) if server.command_set_planner(test_planner, expect_response=True, log=True): print("T - Planner Updated") else: print("T - Planner Update Failed") sleep(2) for speed in test_speeds: test_target.local_velocity = speed server.command_set_target(test_target) sleep(2) print("T - Testing rapid target changes") sleep(3) for i in range(1,100): speed = (i/50,0) test_target.local_velocity = speed server.command_set_target(test_target) sleep(0.02) print("T - Inital Test Complete - testing watchdog") test_target.local_velocity = (1,0) server.command_set_target(test_target)