def _set_action_space()

in robosumo/envs/agents.py [0:0]


    def _set_action_space(self):
        acts = self._xml.find('actuator')
        self.action_dim = len(list(acts))
        default = self._xml.find('default')
        range_set = False
        if default is not None:
            motor = default.find('motor')
            if motor is not None:
                ctrl = motor.get('ctrlrange')
                if ctrl:
                    clow, chigh = list(map(float, ctrl.split()))
                    high = chigh * np.ones(self.action_dim)
                    low = clow * np.ones(self.action_dim)
                    range_set = True
        if not range_set:
            high =  np.ones(self.action_dim)
            low = - np.ones(self.action_dim)
        for i, motor in enumerate(list(acts)):
            ctrl = motor.get('ctrlrange')
            if ctrl:
                clow, chigh = list(map(float, ctrl.split()))
                low[i], high[i] = clow, chigh
        self._low, self._high = low, high
        self.action_space = gym.spaces.Box(low, high)