if (testFlying): print("taking off!") mambo.safe_takeoff(5) if (mambo.sensors.flying_state != "emergency"): print("flying state is %s" % mambo.sensors.flying_state) print("Flying direct: going up") mambo.fly_direct(roll=0, pitch=0, yaw=0, vertical_movement=20, duration=1) print("flip left") print("flying state is %s" % mambo.sensors.flying_state) success = mambo.flip(direction="left") print("mambo flip result %s" % success) mambo.smart_sleep(5) print("landing") print("flying state is %s" % mambo.sensors.flying_state) mambo.safe_land(5) else: print("Sleeeping for 15 seconds - move the mambo around") mambo.smart_sleep(15) # done doing vision demo print("Ending the sleep and vision") mamboVision.close_video() mambo.smart_sleep(5)
print("taking off!") mambo.safe_takeoff(5) if (mambo.sensors.flying_state != "emergency"): print("flying state is %s" % mambo.sensors.flying_state) print("Flying direct: going up") mambo.fly_direct(roll=0, pitch=0, yaw=0, vertical_movement=20, duration=1) print("flip left") print("flying state is %s" % mambo.sensors.flying_state) success = mambo.flip(direction="left") print("mambo flip result %s" % success) mambo.smart_sleep(5) print("flip right") print("flying state is %s" % mambo.sensors.flying_state) success = mambo.flip(direction="right") print("mambo flip result %s" % success) mambo.smart_sleep(5) print("flip front") print("flying state is %s" % mambo.sensors.flying_state) success = mambo.flip(direction="front") print("mambo flip result %s" % success) mambo.smart_sleep(5)