Fix gym warning
This commit is contained in:
parent
f23b39067a
commit
bbbe0f38e3
@ -268,7 +268,7 @@ class MazeEnv(gym.Env):
|
||||
|
||||
def _get_obs_space(self) -> gym.spaces.Box:
|
||||
shape = self._get_obs().shape
|
||||
high = np.inf * np.ones(shape)
|
||||
high = np.inf * np.ones(shape, dtype=np.float32)
|
||||
low = -high
|
||||
# Set velocity limits
|
||||
wrapped_obs_space = self.wrapped_env.observation_space
|
||||
|
@ -1,15 +1,20 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Dict, List, Tuple, Type
|
||||
from typing import Dict, List, NamedTuple, Type
|
||||
|
||||
import numpy as np
|
||||
|
||||
from mujoco_maze.maze_env_utils import MazeCell
|
||||
|
||||
Rgb = Tuple[float, float, float]
|
||||
|
||||
RED = (0.7, 0.1, 0.1)
|
||||
GREEN = (0.1, 0.7, 0.1)
|
||||
BLUE = (0.1, 0.1, 0.7)
|
||||
class Rgb(NamedTuple):
|
||||
red: float
|
||||
green: float
|
||||
blue: float
|
||||
|
||||
|
||||
RED = Rgb(0.7, 0.1, 0.1)
|
||||
GREEN = Rgb(0.1, 0.7, 0.1)
|
||||
BLUE = Rgb(0.1, 0.1, 0.7)
|
||||
|
||||
|
||||
class MazeGoal:
|
||||
|
@ -31,7 +31,7 @@ class PointEnv(AgentModel):
|
||||
|
||||
def __init__(self, file_path: Optional[str] = None):
|
||||
super().__init__(file_path, 1)
|
||||
high = np.inf * np.ones(6)
|
||||
high = np.inf * np.ones(6, dtype=np.float32)
|
||||
high[3:] = self.VELOCITY_LIMITS
|
||||
high[self.ORI_IND] = np.pi
|
||||
low = -high
|
||||
|
Loading…
Reference in New Issue
Block a user