Comments (10)
Did you try this?
https://mujoco.readthedocs.io/en/latest/XMLreference.html#size-memory
https://mujoco.readthedocs.io/en/latest/modeling.html#csize
from mujoco.
@yuvaltassa The mesh file that I'm currently trying to load is attached here (
MSH41_exceed_memory.zip). I tried the advice that you recommended in those above links. As you can see in the code below, I include the line <size memory = "8G"/>
in my XML file which I thought would be a reasonable amount of allocated memory:
import mujoco
import mediapy as media
xml = r"""
<mujoco model="3DMBB">
<size memory = "8G"/>
<worldbody>
<flexcomp name="3DMBB" type="gmsh" dim="3" file="converted_3d_mbb_ascii.stl_out_vol.msh">
<edge equality="true"/>
</flexcomp>
</worldbody>
</mujoco>
"""
# Make model and data
model = mujoco.MjModel.from_xml_string(xml)
data = mujoco.MjData(model)
# Make renderer, render and show the pixels
renderer = mujoco.Renderer(model)
mujoco.mj_forward(model, data)
renderer.update_scene(data)
media.show_image(renderer.render())
However, I get this error message below:
ValueError: Error: engine error: mj_stackAlloc: insufficient memory: max = 8573357512, available = 107779936, requested = 8461964232 (ne = 57810, nf = 0, nefc = 57810, ncon = 0)
How do I load in .msh files with a large amount of nodes and elements (~10k nodes, ~40k elements) like this one? Do I need to try run the model on a different machine with more RAM (my machine has 64GB of memory)? Even when I try to load the model with the following setting <size memory = "20G"/>
to increase the memory allocation I get the following output:
ValueError: XML Error: unsigned integer with an optional suffix {K,M,G,T,P,E} is expected in attribute 'memory' (or the size specified is too big)
Element 'size', line 3
This indicates that I can't allocate 20GB of memory even though I should be able to on my machine?
from mujoco.
Ah the latter seems like an actual bug in the parser, we should be using long
instead of int
somewhere...
from mujoco.
@yuvaltassa Thanks for the clarification - what about the first/former issue? Why do I get the error below when it clearly says I have both a max
and available
amount of memory greater than what was requested?
ValueError: Error: engine error: mj_stackAlloc: insufficient memory: max = 8573357512, available = 107779936, requested = 8461964232 (ne = 57810, nf = 0, nefc = 57810, ncon = 0)
Will I have to wait for the bug that you identified to be fixed before I can model this 3D mesh file in MuJoCo?
from mujoco.
Why do I get the error below when it clearly says I have both a max and available amount of memory greater than what was requested?
Count more carefully, available
is smaller by an order of magnitude...
from mujoco.
So when I requested 8GB of memory in the above example, I actually only had 100MB available? Why is this the case? When I print out the available memory on my machine in the terminal, it says I currently have 39GB of memory available (see below):
Surely 39GB of available memory should be more than enough to simulate the mesh file with ~10k nodes, ~40k elements, no?
from mujoco.
Like I said, I think we have some bug related to using an int
somewhere where we shouldn't. INT_MAX
is 2147483647 which is just 2.14GB ...
from mujoco.
The main bug is now fixed at head. Build from source or wait for next release.
from mujoco.
When will the next release be?
from mujoco.
May 6th
from mujoco.
Related Issues (20)
- [<Actuator>] Custom Control Range Mapping for Actuators in MJCF XML HOT 2
- MuJoCo ROS Integration - segmentation faults in model instance (from version 3.1.1 -> ^3.1.2) HOT 1
- Camera Rendering Incomplete After Modifying znear and zfar
- D4RL mujoco datasets compatibility between versions HOT 1
- MuJoCo cup model penetrating floor/table HOT 3
- Issues with Point Cloud Visibility in Camera's Field of View Using MuJoCo
- Document MJX "broadphase" fields
- Simulating tension only cables with variable lengths
- Disabling contact rendering for Touch Sensor Grid plugin HOT 1
- Human musculoskeletal motion simulation using mujoco HOT 1
- Build from Source incl. Python Bindings HOT 1
- unity 'mujoco.elasticity.cable' error HOT 1
- `mj_copyData` not copying contact details? HOT 3
- Getting contact information and z-position from external rendering software HOT 2
- Changing the geom mass fails to affect simulation properties? HOT 2
- How to set free joint in keyframe
- Saving the xml with updates after mj_step
- Transforming contact forces from the contact frame to the local frame of a geom involved in said contact/collision?
- differentiable physics tutorial missing module brax
- Error: engine error: edge ordering is incoherent between flex and plugin / mujoco.elasticity.solid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mujoco.