Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions robosuite/environments/manipulation/lift.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import OrderedDict

import numpy as np
import random

from robosuite.environments.manipulation.manipulation_env import ManipulationEnv
from robosuite.models.arenas import TableArena
Expand Down Expand Up @@ -438,3 +439,23 @@ def _check_success(self):

# cube is higher than the table top above a margin
return cube_height > table_height + 0.04


class LocoLift(Lift):

def _load_model(self):
"""
Loads an xml model, puts it in self.model
"""
self.table_full_size = random.choice([(2.0, 0.8, 0.05), (0.8, 2.0, 0.05)])
self.table_offset = np.array(
(
random.uniform(0, 1),
random.uniform(-0.5, 0.5),
0.8,
)
)
if self.placement_initializer is not None:
self.placement_initializer.reference_pos = self.table_offset

super()._load_model()
Loading