Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions backyard_flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,14 @@ def state_callback(self):

def calculate_box(self):
print("Setting Home")
local_waypoints = [[10.0, 0.0, 3.0], [10.0, 10.0, 3.0], [0.0, 10.0, 3.0], [0.0, 0.0, 3.0]]
local_waypoints = [[10.0, 0.0, 3.0, 0.0], [10.0, 10.0, 3.0, 0.0], [0.0, 10.0, 3.0, 0.0], [0.0, 0.0, 3.0, 0.0]]
return local_waypoints

def arming_transition(self):
print("arming transition")
self.take_control()
self.arm()
self.set_home_position(self.global_position[0], self.global_position[1],
self.global_position[2]) # set the current location to be the home position
self.set_home_position(*self.global_position) # set the current location to be the home position

self.flight_state = States.ARMING

Expand All @@ -95,7 +94,7 @@ def waypoint_transition(self):
print("waypoint transition")
self.target_position = self.all_waypoints.pop(0)
print('target position', self.target_position)
self.cmd_position(self.target_position[0], self.target_position[1], self.target_position[2], 0.0)
self.cmd_position(*self.target_position)
self.flight_state = States.WAYPOINT

def landing_transition(self):
Expand Down