mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-20 22:12:03 +00:00
New robotics environments (#912)
This commit is contained in:
committed by
GitHub
parent
c5b624c6a6
commit
78c416ef7b
23
gym/envs/robotics/fetch/slide.py
Normal file
23
gym/envs/robotics/fetch/slide.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import numpy as np
|
||||
|
||||
from gym import utils
|
||||
from gym.envs.robotics import fetch_env
|
||||
|
||||
|
||||
class FetchSlideEnv(fetch_env.FetchEnv, utils.EzPickle):
|
||||
def __init__(self, reward_type='sparse'):
|
||||
initial_qpos = {
|
||||
'robot0:slide0': 0.05,
|
||||
'robot0:slide1': 0.48,
|
||||
'robot0:slide2': 0.0,
|
||||
'table0:slide0': 0.7,
|
||||
'table0:slide1': 0.3,
|
||||
'table0:slide2': 0.0,
|
||||
'object0:joint': [1.7, 1.1, 0.4, 1., 0., 0., 0.],
|
||||
}
|
||||
fetch_env.FetchEnv.__init__(
|
||||
self, 'fetch/slide.xml', has_object=True, block_gripper=True, n_substeps=20,
|
||||
gripper_extra_height=-0.02, target_in_the_air=False, target_offset=np.array([0.4, 0.0, 0.0]),
|
||||
obj_range=0.1, target_range=0.3, distance_threshold=0.05,
|
||||
initial_qpos=initial_qpos, reward_type=reward_type)
|
||||
utils.EzPickle.__init__(self)
|
Reference in New Issue
Block a user