Ejemplo n.º 1
0
    def __init__(self, config):
        self.intelligence = Intelligence(self, config)
        self.x = 10
        self.y = 10
        self.newX = self.x
        self.newY = self.y
        self.dirAngle = pi / 4

        ## Current text describing state of ProcessArea, used to show best info about its state in GUI.
        self.paText = ' '

        ## Fields of view for normal atomic action
        self.viewConesNormal = []
        self.viewConesNormal.append(ViewCone(0.1, pi * 0.9, 5))
        self.viewConesNormal.append(ViewCone(0.3, pi / 2, 20))
        self.viewConesNormal.append(ViewCone(0.3, pi / 4, 30))
        self.viewConesNormal.append(ViewCone(0.3, pi / 8, 50))
        ## Fields of view for Explore atomic action
        self.viewConesForExplore = []
        self.viewConesForExplore.append(ViewCone(0.4, pi, 10))
        self.viewConesForExplore.append(ViewCone(0.4, pi, 20))
        self.viewConesForExplore.append(ViewCone(0.4, pi, 30))
        self.viewCones = self.viewConesNormal
        self.viewConeNormalMaxDist = 0
        for vc in self.viewConesNormal:
            self.viewConeNormalMaxDist = max(self.viewConeNormalMaxDist,
                                             vc.distance)
        self.viewConeForExploreMaxDist = 0
        for vc in self.viewConesForExplore:
            self.viewConeForExploreMaxDist = max(
                self.viewConeForExploreMaxDist, vc.distance)
        self.viewConeMaxDist = self.viewConeNormalMaxDist