Files
autopilot/main.py
2025-09-16 21:29:26 +03:00

31 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from autopilot import AutoPilot, RandomPilot
from simulator import Simulator
from visualization import VisualizationManager
from trajectory_drawer import TrajectoryDrawer
from yandex_map import YandexMap
# Создаем менеджер визуализации
# viz_manager = VisualizationManager("Drone Autopilot - Global Map & Detection")
# Создаем симулятор с AutoPilot для обработки изображений
# Передаем менеджер визуализации в автопилот
# simulator = Simulator(RandomPilot(), AutoPilot(viz_manager=viz_manager), viz_manager=viz_manager)
yandexMap = YandexMap()
yandexMap.savePhoto('map.jpg')
# yandexMap.destroy()
trajectoryDrawer = TrajectoryDrawer('map.jpg')
trajectoryDrawer.on_complete_trajectory = lambda x: print(x)
trajectoryDrawer.show()
# Использование
# if __name__ == "__main__":
# # Укажите путь к вашему изображению
# image_path = "map.jpg" # Замените на путь к вашему изображению
# drawer = TrajectoryDrawer(image_path)
# drawer.show()
# Запускаем симуляцию
# simulator.loop()