mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-19 13:32:03 +00:00
fix advanced mujoco envs for windows path separation (#1220)
This commit is contained in:
committed by
Matthias Plappert
parent
803d84e5d5
commit
a488c2fe2f
@@ -1,7 +1,12 @@
|
||||
import os
|
||||
from gym import utils
|
||||
from gym.envs.robotics import fetch_env
|
||||
|
||||
|
||||
# Ensure we get the path separator correct on windows
|
||||
MODEL_XML_PATH = os.path.join('fetch', 'push.xml')
|
||||
|
||||
|
||||
class FetchPushEnv(fetch_env.FetchEnv, utils.EzPickle):
|
||||
def __init__(self, reward_type='sparse'):
|
||||
initial_qpos = {
|
||||
@@ -11,7 +16,7 @@ class FetchPushEnv(fetch_env.FetchEnv, utils.EzPickle):
|
||||
'object0:joint': [1.25, 0.53, 0.4, 1., 0., 0., 0.],
|
||||
}
|
||||
fetch_env.FetchEnv.__init__(
|
||||
self, 'fetch/push.xml', has_object=True, block_gripper=True, n_substeps=20,
|
||||
self, MODEL_XML_PATH, has_object=True, block_gripper=True, n_substeps=20,
|
||||
gripper_extra_height=0.0, target_in_the_air=False, target_offset=0.0,
|
||||
obj_range=0.15, target_range=0.15, distance_threshold=0.05,
|
||||
initial_qpos=initial_qpos, reward_type=reward_type)
|
||||
|
Reference in New Issue
Block a user