-
Notifications
You must be signed in to change notification settings - Fork 253
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
How many nested bodies do brax support?(w.r.t rope and wire ) #386
Comments
If I increased the nested amount of the rope above 5, the generalized pipeline step will give me Step result state.x.pos under 5 nested rope setting.
Step result state.x.pos under 6 more nested rope settings.
[*]: The first joint with 2-dof is used to fix the link-joint problem; the links should be equal to joints at Brax. |
I did another experiment about nested bodiesMJCF file:
Code:
Output:
It turned out the same result full of nan in the returned state. |
Hi @baixianger , thanks for the bug report! Looks like a certain part of the generalized backend is unstable with this nested rope. If you look at https://jax.readthedocs.io/en/latest/debugging/flags.html#jax-debugging-flags , there are debugging flags for NaNs
If you run with that, you may get an indication about where the NaNs are coming from, which would give hints about what to change in the model to make the calculation more stable (perhaps mass/inertia/timestep). I would also suggest turning off self-collisions with the panda arm unless absolutely necessary, convex<>convex collisions are expensive to compute in Brax. |
Some gossips beyond this topic, Today Mujoco 3 is released. I realized why your teams replied so late during those months. I guess you all were working on Mujoco3. LOL. I really appreciate your jobs both on Brax and Mujoco3. |
Haha @baixianger , yeah sorry about the late replies and thanks for bearing with us... |
@baixianger OOC have you tried this with MJX? |
I just ran into this bug with a 15-link chain in MJX. I'm finding that I need higher matmul precision and/or f64 to avoid NaNs: jax.config.update("jax_default_matmul_precision", "highest") or jax.config.update("jax_enable_x64", True) |
I implemented my rope with nested rigid bodies and joints, and I did some experiments on Brax. I found that Brax only supports limited nested bodies.
Would you happen to have any solution for a rope?
The text was updated successfully, but these errors were encountered: