feat: add zoom
This commit is contained in:
9
main.py
9
main.py
@@ -4,6 +4,7 @@ from trajectory_drawer import TrajectoryDrawer
|
||||
from yandex_map import YandexMap
|
||||
from time import sleep
|
||||
from pathlib import Path
|
||||
import random
|
||||
|
||||
import cv2
|
||||
import matplotlib.pyplot as plt
|
||||
@@ -106,8 +107,16 @@ def main():
|
||||
|
||||
proc_time = np.array([])
|
||||
|
||||
zoom_next_event = random.randint(5, 10)
|
||||
|
||||
for i in range(10000000000):
|
||||
print(f"Image #{i}")
|
||||
if i == zoom_next_event:
|
||||
r = random.randint(0, 1)
|
||||
direction = ['up', 'down'][r]
|
||||
simulator.change_zoom(direction)
|
||||
zoom_next_event = i + random.randint(20, 40)
|
||||
|
||||
photo = simulator.get_photo()
|
||||
command = pilot.handle(photo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user