First Version (#1)
Co-authored-by: Anujith Muraleedharan <140189296+AnujithM@users.noreply.github.com>
This commit is contained in:
33
example_exercises/11_emergency_stop.py
Executable file
33
example_exercises/11_emergency_stop.py
Executable file
@@ -0,0 +1,33 @@
|
||||
from tello_sim.tello_sim_client import TelloSimClient
|
||||
|
||||
import time
|
||||
|
||||
from tello_sim.tello_sim_client import TelloSimClient
|
||||
|
||||
# Create a Tello instance
|
||||
tello = TelloSimClient()
|
||||
|
||||
# Connect to Tello
|
||||
tello.connect()
|
||||
|
||||
print("Starting flying in ...")
|
||||
for i in range(3, 0, -1):
|
||||
print(i)
|
||||
time.sleep(1)
|
||||
|
||||
# Takeoff
|
||||
print("Take off")
|
||||
tello.takeoff()
|
||||
|
||||
|
||||
for i in range(10, 0, -1):
|
||||
print("Get Ready to catch drone!")
|
||||
print("Emergency stop in", i)
|
||||
time.sleep(1)
|
||||
|
||||
print("Emergency stop now!")
|
||||
# Land
|
||||
tello.emergency()
|
||||
|
||||
# End the connection
|
||||
tello.end()
|
||||
Reference in New Issue
Block a user