You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code where I initialize the environment and attempt to render the environment (main.py) crashes and results in this:
Traceback (most recent call last):
File "/Users/vijaykumaravelrajan/PycharmProjects/pythonProject4/main.py", line 108, in <module>
env = suite.make(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/base.py", line 42, in make
return REGISTERED_ENVS[env_name](*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/manipulation/stack.py", line 183, in __init__
super().__init__(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/manipulation/manipulation_env.py", line 162, in __init__
super().__init__(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/robot_env.py", line 214, in __init__
super().__init__(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/base.py", line 139, in __init__
self._initialize_sim()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/environments/base.py", line 235, in _initialize_sim
self.sim = MjSim.from_xml_string(xml)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/robosuite/utils/binding_utils.py", line 1073, in from_xml_string
model = mujoco.MjModel.from_xml_string(xml)
ValueError: XML Error: Schema violation: unrecognized attribute: 'name'
Element 'geom', line 374
Below is the code for the initialization of the cloth object and a modified stack task importing the object:
# create environment instance
class ClothObject(MujocoXMLObject):
def __init__(self, name):
super().__init__("cloth.xml",
name=name)
class Stack(suite.Stack):
def _load_model(self):
"""
Loads an xml model, puts it in self.model
"""
super()._load_model()
# Adjust base pose accordingly
xpos = self.robots[0].robot_model.base_xpos_offset["table"](self.table_full_size[0])
self.robots[0].robot_model.set_base_xpos(xpos)
# load model for table top workspace
mujoco_arena = TableArena(
table_full_size=self.table_full_size,
table_friction=self.table_friction,
table_offset=self.table_offset,
)
# Arena always gets set to zero origin
mujoco_arena.set_origin([0, 0, 0])
self.clothB = ClothObject(name = "testCLoth")
objects = [self.clothB]
# Create placement initializer
if self.placement_initializer is not None:
self.placement_initializer.reset()
self.placement_initializer.add_objects(objects)
else:
self.placement_initializer = UniformRandomSampler(
name="ObjectSampler",
mujoco_objects=objects,
x_range=[-3, 3],
y_range=[-3, 3],
rotation=None,
ensure_object_boundary_in_range=False,
ensure_valid_placement=True,
reference_pos=self.table_offset,
z_offset=0.01,
)
# task includes arena, robot, and objects of interest
self.model = ManipulationTask(
mujoco_arena=mujoco_arena,
mujoco_robots=[robot.robot_model for robot in self.robots],
mujoco_objects=objects,
)
Has this issue been resolved since this previous issue report? #276
The text was updated successfully, but these errors were encountered:
Hello Robosuite Team,
I'm having issues importing a deformable cloth object. The xml file I'm using to define the object is below:
The code where I initialize the environment and attempt to render the environment (main.py) crashes and results in this:
Below is the code for the initialization of the cloth object and a modified stack task importing the object:
Has this issue been resolved since this previous issue report?
#276
The text was updated successfully, but these errors were encountered: