コード例 #1
0
 def setUp(self):
     self.__charger = Charger("TopLeftCharger")
     self.__charger.setCoordinates(0, 10)
     self.__drone = IdealDrone("Drone")
コード例 #2
0
from dckit.tasks.takeoff_task import TakeoffTask
from dckit.tasks.landing_task import LandingTask
from dckit.drivers.ardrone import ARDrone
from dckit.drivers.realistic import RealisticDrone
from dckit.charger.charger import Charger
import logging
import cv2
import time

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

dckit = DCKit()

# Initialize chargers
charger1 = Charger("TopLeftCharger")
charger1.setCoordinates(0, 0, 0)

drone = ARDrone("Drone 1")
drone.charger = charger1
drone.position = charger1.getCoordinates()
drone.target = charger1.getCoordinates()
# drone.hue_range = (70, 100)
time.sleep(1)
dckit.addDrone(drone)

task = Task("Maintask")
subtask1 = TakeoffTask()

sqsize = 130