Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Prepare for pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
mvog2501 committed Nov 14, 2022
1 parent 68f4716 commit 3105b1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/driver_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import numpy as np
import cv2

# WIP Feature, not currently used.

# data_dict holds both images and the camera that took them
def get_driver_frame(data_dict):
# Just get the cameras marked as driver
Expand All @@ -11,12 +13,11 @@ def get_driver_frame(data_dict):
if drivers:
# Arrange the images into one collage
collage = create_collage(drivers)
collage = cv2.resize(collage, (50,50))
else:
# Just give back a blank image
# TODO: Descriptive image
collage = np.zeros(shape=[512,512,3], dtype=np.uint8)

cv2.imshow("collage", collage)
return collage


Expand Down
9 changes: 0 additions & 9 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ def main():
}
api = ShuffleLogAPI(messenger_params, environment['tags'], cameras['cameras'])

# Initialize Flask camera stream
port = 5802
stream = Streamer(port, False)
stream.start_streaming()

# Main loop, run all the time like limelight
while True:
Expand All @@ -118,8 +114,6 @@ def main():

position, matrices = solver.solve(detection_poses)

# print(position)

if not args.no_gui:
for i, image in enumerate(data):
cv2.imshow(str(i), image['image'])
Expand All @@ -129,9 +123,6 @@ def main():
if position is None: position = [0, 0, 0]
table.putNumberArray('position', position)

# Send the camera feed to driver station
stream.update_frame(get_driver_frame(data))

# Read incoming API messages
api.read()

Expand Down

0 comments on commit 3105b1d

Please sign in to comment.