def step(self, action):
        if self.MANUAL_COLLISION:
            old_pos = self.wrapped_env.get_xy()
            _, _, done, info = self.wrapped_env.step(action)
            new_pos = self.wrapped_env.get_xy()
            if self._is_in_collision(new_pos):
                self.wrapped_env.set_xy(old_pos)
                done = False
        else:
            _, _, done, info = self.wrapped_env.step(action)
        next_obs = self.get_current_obs()
        x, y = self.wrapped_env.get_body_com("torso")[:2]
        # ref_x = x + self._init_torso_x
        # ref_y = y + self._init_torso_y
        reward = 0
        minx, maxx, miny, maxy = self._goal_range
        # print "goal range: x [%s,%s], y [%s,%s], now [%s,%s]" % (str(minx), str(maxx), str(miny), str(maxy),
        #                                                          str(x), str(y))
        if minx <= x <= maxx and miny <= y <= maxy:
            done = True
            reward = 1
        return Step(next_obs, reward, done, **info)
dataset/ETHPy150Open rllab/rllab/rllab/envs/mujoco/maze/maze_env.py/MazeEnv.step/original