MCPcopy
hub / github.com/dronekit/dronekit-python / launch

Method launch

examples/drone_delivery/drone_delivery.py:69–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 self.vehicle.add_attribute_listener('location', self.location_callback)
68
69 def launch(self):
70 self._log("Waiting for location...")
71 while self.vehicle.location.global_frame.lat == 0:
72 time.sleep(0.1)
73 self.home_coords = [self.vehicle.location.global_frame.lat,
74 self.vehicle.location.global_frame.lon]
75
76 self._log("Waiting for ability to arm...")
77 while not self.vehicle.is_armable:
78 time.sleep(.1)
79
80 self._log('Running initial boot sequence')
81 self.change_mode('GUIDED')
82 self.arm()
83 self.takeoff()
84
85 if self.webserver_enabled is True:
86 self._run_server()
87
88 def takeoff(self):
89 self._log("Taking off")

Callers 2

setup_sitlFunction · 0.80
drone_delivery.pyFile · 0.80

Calls 5

_logMethod · 0.95
change_modeMethod · 0.95
armMethod · 0.95
takeoffMethod · 0.95
_run_serverMethod · 0.95

Tested by

no test coverage detected