Esempio n. 1
0
class MissionManager(object):
    def __init__(self):
        self.missionDaoIns = MissionDao()
        self.mapDaoIns = MapDao()
        self.robotDaoIns = RobotDao()

    def getCurrentMissionList(self):
        return self.missionDaoIns.getAll()

    def getMission(self, key):
        return self.missionDaoIns.get(key)

    def getMap(self, mission):
        return self.mapDaoIns.get(mission.map_key)

    def getRobot(self, mission):
        return self.robotDaoIns.get(mission.robot_key)

    def start_Explore(self, path, targetPos, PathManagerIns):
        if interface.explore(interface(), path, self, targetPos,
                             PathManagerIns) == 'printPath':
            return 'printPath'

    def makeNewPath(self, hazard, curPos, targetPos,
                    PathManagerIns):  # curPos - Start Point
        print 'Find New Path'
        PathManagerIns.pathGenerator(hazard, self, curPos, targetPos,
                                     PathManagerIns)

    def AddColorBlob(self, colorArr, PathManagerIns):
        PathManagerIns.addColorBlob(colorArr)

    def setPreviousPath(self, path, PathManagerIns):
        PathManagerIns.setPreviousPath(path)
Esempio n. 2
0
class MissionManager(object):
    def __init__(self):
        self.missionDaoIns = MissionDao()
        self.mapDaoIns = MapDao()
        self.robotDaoIns = RobotDao()
        
    def getCurrentMissionList(self):
        return self.missionDaoIns.getAll()
    def getMission(self, key):
        return self.missionDaoIns.get(key)
    def getMap(self, mission):
        return self.mapDaoIns.get(mission.map_key)
    def getRobot(self, mission):
        return self.robotDaoIns.get(mission.robot_key)
    def start_Explore(self, path, targetPos, PathManagerIns):
        if interface.explore(interface(), path, self, targetPos, PathManagerIns) == 'printPath' :
            return 'printPath'
    def makeNewPath(self, hazard, curPos, targetPos, PathManagerIns): # curPos - Start Point 
        print 'Find New Path'
        PathManagerIns.pathGenerator(hazard, self, curPos, targetPos, PathManagerIns)
    def AddColorBlob(self, colorArr, PathManagerIns):
        PathManagerIns.addColorBlob(colorArr)
    def setPreviousPath(self, path, PathManagerIns):
        PathManagerIns.setPreviousPath(path)
Esempio n. 3
0
 def __init__(self):
     self.missionDaoIns = MissionDao()
     self.mapDaoIns = MapDao()
     self.robotDaoIns = RobotDao()
Esempio n. 4
0
 def getRobotList(self):
     return RobotDao.getAll(RobotDao())
Esempio n. 5
0
 def addRobot(self, robot):
     RobotDao.add(RobotDao(),robot)
Esempio n. 6
0
 def getRobotList(self):
     return RobotDao.getAll(RobotDao())
Esempio n. 7
0
 def addRobot(self, robot):
     RobotDao.add(RobotDao(), robot)
Esempio n. 8
0
 def __init__(self):
     self.missionDaoIns = MissionDao()
     self.mapDaoIns = MapDao()
     self.robotDaoIns = RobotDao()