Example #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)
Example #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)
Example #3
0
 def __init__(self):
     self.missionDaoIns = MissionDao()
     self.mapDaoIns = MapDao()
     self.robotDaoIns = RobotDao()
Example #4
0
 def __init__(self):
     self.missionDaoIns = MissionDao()
     self.mapDaoIns = MapDao()
     self.robotDaoIns = RobotDao()