Skip to content

Commit

Permalink
Identify Mr. York Only with marker Id 1
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhan committed Sep 2, 2019
1 parent f318fcf commit 5b9574c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/game_master/scripts/autonomous_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def begin_look_for_ground_robot(self):
def look_for_ground_robot(self):

if self.groundSwipeCount == 0:
self.drone.cameraControl(-20, 0)
self.drone.cameraControl(-25, 0)
elif self.groundSwipeCount == 1:
self.drone.cameraControl(-40, 0)
elif self.groundSwipeCount == 2:
Expand Down
8 changes: 4 additions & 4 deletions src/game_master/scripts/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class DroneVision:
EAST_ENTRANCE_MARKER_ID = 39
NORTH_ENTRANCE_MARKER_ID = 41
LANDING_PAD_MARKER_ID = 40
GROUND_ROBOT_MARKER_IDS = [1, 2, 3, 4]
GROUND_ROBOT_MARKER_ID = 1
RED_VEHICLE_MARKER_ID = 10
ALL_MARKER_IDS = [EAST_ENTRANCE_MARKER_ID, NORTH_ENTRANCE_MARKER_ID, LANDING_PAD_MARKER_ID, RED_VEHICLE_MARKER_ID] + GROUND_ROBOT_MARKER_IDS
ALL_MARKER_IDS = [GROUND_ROBOT_MARKER_ID, EAST_ENTRANCE_MARKER_ID, NORTH_ENTRANCE_MARKER_ID, LANDING_PAD_MARKER_ID, RED_VEHICLE_MARKER_ID]

def __init__(self, drone, vfov=45, hfov=80, expectedDistance= 6.50, northToSouth=7.50, eastToWest=6.90):
self.drone = drone
Expand Down Expand Up @@ -72,7 +72,7 @@ def __init__(self, drone, vfov=45, hfov=80, expectedDistance= 6.50, northToSouth
# New frame flag
self.newFrameProcessed = False
self.processLine = True
self.processMarker = False
self.processMarker = True
self.processBear = False

def angle_between(self, a, b, c):
Expand Down Expand Up @@ -151,7 +151,7 @@ def calculateFrontalDistance(self, origImg, frameTime, Display=True):
vehicle_found = True
vehicle_bounding_box = [corners[i][0][0][0], corners[i][0][0][1], corners[i][0][0][0] + 40, corners[i][0][0][1] + 40]
siteFramePosition = markerCentre
elif ids[i][0] in self.GROUND_ROBOT_MARKER_IDS:
elif ids[i][0] == self.GROUND_ROBOT_MARKER_ID:
self.groundRobotVisible = True
self.groundRobotAngle = self.drone.yaw - np.radians(markerAngleDeg)
self.groundRobotDistance = markerDistance
Expand Down

0 comments on commit 5b9574c

Please sign in to comment.