Open sachinkundu opened 11 months ago
I am having a similar issue trying to load a flexcomp object with dm_control PyMJCF.
I have this xml file with my flexcomp object taken from here.
<mujoco model="Flag">
<!-- Degree of Freedom (nv): 340
Tendons (ntendon): 288
Actuators (nu): 0
Constraints (nefc): 0
This model of a flag passively flapping in the wind has no constraints and is designed to
exert smooth dynamics computations.
-->
<statistic center=".4 0 .8" extent="1.3"/>
<option wind="5 5 0" density="10" solver="CG" tolerance="1e-6">
</option>
<extension>
<plugin plugin="mujoco.elasticity.shell"/>
</extension>
<worldbody>
<geom name="floor" type="plane" size="0 0 .1"/>
<light diffuse=".6 .6 .6" specular="0.2 0.2 0.2" pos="0 0 4" dir="0 0 -1"/>
<body name="pin" pos="0 0 1.5">
<flexcomp type="grid" count="9 19 1" spacing=".05 .05 .05" mass="10"
name="flag" radius="0.001">
<edge equality="true" damping="0.001"/>
<plugin plugin="mujoco.elasticity.shell">
<config key="poisson" value="0"/>
<config key="thickness" value="1e-2"/>
<!--Units are in Pa (SI)-->
<config key="young" value="3e6"/>
</plugin>
</flexcomp>
</body>
</worldbody>
<equality>
<connect body1="flag_0" anchor="0 0 0"/>
</equality>
</mujoco>
I try to compile this using PyMJCF in this code here:
from dm_control import mjcf
mjcf_root = mjcf.from_path("flag_flex.xml")
physics = mjcf.Physics.from_mjcf_model(mjcf_root)
I get this error below:
ValueError: Line 39: error while parsing element <edge>: during initialization of attribute 'equality' of element <edge>: Expect an integer value: got true
The documentation and the code seem to agree that this is a boolean, @quagla any idea what's going on here?
I am facing a similar issue. It seem's like dm control does not have support for flexcomp just yet? Just wanted to make sure that this is the case or if there's something I am missing. Here's the code I was trying to implement: ` bag_xml = """
Any updates regarding this issue? I'm also facing a very similar issue.
Mujoco 3.0 introduced flexcomp object for modelling deformable obejcts.
However trying to create a Prop using
Errors out as flexcomp is not recoginzed as part of schema.
I modified schema.xml(which is part of mjcf under dm_control) and after adding all the tags and attibutes that I am using in an xml such as below
I can get the xml to be parsed and get a Prop object. I looked at composite as an example and copied over the spec as described in mujoco XML reference.
However I cannot get the simulation to run and it fails at this line
self._qp_mapper = _CartesianVelocityMapper(qp_params)
indm_robotics/moma/effectors/cartesian_6d_velocity_effector.py
. The error isProcess finished with exit code 139 (interrupted by signal 11:SIGSEGV)
which just sounds like it crashedI cannot understand why. The whole file which I am running is
Which is just a modification of the basic example in [dm_robotics_panda] (https://github.com/JeanElsner/dm_robotics_panda)
Commenting out creating of Cloth and adding to props list works fine.