in gym_hil/wrappers/hil_wrappers.py [0:0]
def __init__(self, env, ee_action_step_size, use_gripper=False):
super().__init__(env)
self.ee_action_step_size = ee_action_step_size
self.use_gripper = use_gripper
self._ee_step_size = np.array(
[
ee_action_step_size["x"],
ee_action_step_size["y"],
ee_action_step_size["z"],
]
)
num_actions = 3
# Initialize action space bounds for the non-gripper case
action_space_bounds_min = -np.ones(num_actions)
action_space_bounds_max = np.ones(num_actions)
if self.use_gripper:
action_space_bounds_min = np.concatenate([action_space_bounds_min, [0.0]])
action_space_bounds_max = np.concatenate([action_space_bounds_max, [2.0]])
num_actions += 1
ee_action_space = gym.spaces.Box(
low=action_space_bounds_min,
high=action_space_bounds_max,
shape=(num_actions,),
dtype=np.float32,
)
self.action_space = ee_action_space