-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mjx.put_data() and mjx.put_model() takes lot of time to resolve #1670
Comments
Hi @AnxSnip , see here for more info about the performance characteristics of MJX: https://mujoco.readthedocs.io/en/stable/mjx.html#mjx-the-sharp-bits Seems like you are trying to simulate a bunch of boxes? Try to fiddle with some of these parameters (NB: max contacts, the solver iters): mujoco/mjx/mujoco/mjx/test_data/shadow_hand/right_hand.xml Lines 4 to 11 in e885a3d
The timestep seems really high, but I notice you use RK4. Consider lowering the timestep and using Newton for MJX. Hope that helps. |
Hello @btaba, thank you for your quick response. |
Hi @AnxSnip , sorry this slipped through. Could you re-paste a full example XML so we can help debug? Looks like the previous link expired |
Hello @btaba, no need to worry, I managed to stabilize my model and realized that handling collisions with multiple items doesn't work well with MJX. So, I think I'll stick with the classic version. However, I now have some questions about how to apply force to a body. I noticed that we can use site and actuator in the XML or xfrc_applied in the code, but there aren't many examples or much documentation on this. Can you point me to some resources? |
Hi,
I'm a student and I'm trying to use MuJoCo to model forces applied on a cargo shipment.
I'm looking for some help with the loading of the data from mujoco to mjx.
Every is working fine with the mujoco model and the simulation works well (takes 1 to 10 seconds depending on the force). But I wanted it to be faster so I began using MJX. But I noticed that the conversion to jax array and the jitted step method takes way longer time than the classic mujoco version.
Am I doing something wrong ? or it is just that MJX cannot handle so many shapes?
Here's the code I use:
`
def run_jitted(xml):
duration = 30
jit_step = jax.jit(mjx.step)
`
Here is a model which explains my question:
https://pastebin.com/W0xQXiFL
The text was updated successfully, but these errors were encountered: