Closed WeisonWEileen closed 3 weeks ago
Thanks for your reply. After days of trying, I tried to use <equality/connect> instead of <equality/anchor>(because I can access the accurate point of 2 link, I think using two sites in two body will working better. ). I was succussful to connect right leg of my closed loop . However, when I connect left leg, the simulation diverge. I try many approaches, but in vain。 here is my repo with all code and .stl model files.
https://github.com/WeisonWEileen/mujoco_test.git
only right leg (left leg without closed loop): works fine
with left leg (cannot work):
Thanks!
Are you aware the if you click the 'E' button in simulate
, you can see the two points of the equality constraint? That should help you debug what is happening.
If that's doesn't help you solve it, and you still need us to look at your example, it would be much easier for us if you posted a file that only contains primitives and does not require meshes. You can easily ask MuJoCo to fit primitives in place of the meshes, then save the XML and delete all the mesh assets. This will give you a self-contained XML that you can paste here.
Regarding using sites to define the constraints, we just discovered several bugs thanks to @yinfanyi's #2179, so please don't use those until the fix has been submitted.
oh, After I click 'E' button, I see there are difference between the two points I want to connect. What does it implied(right leg is successful connected)? Does it means the two sites of left leg are not coincident in position ? original screenshot(without clicking E)
This looks fine. These are just different kinds of z-fighting, the equality is satisfied in the default configuration.
Okay, I looked at your model posted above. I uncommented line 394 in test.xml
and played with the mechanism, both constraints work fine. My assumption is that this is one of the bugs that was fixed in the change that fixed #2179. If you build from source everything will work as expected.
Thanks for replied! After install the latest version of mujoco(3.2.5), the problem metioned above was successful solved. However, the constrained is not tight when moving, which caused a lot of trouble for my Angle conversion in the simulation. It is a bug ? @yuvaltassa
https://github.com/user-attachments/assets/55756c62-20f7-44c9-ba1c-0865783952cf
Not a bug. Default settings are fairly soft, make the equality constraints stiffer.
Intro
Hi!
I am a undergrad student at sustech, I use MuJoCo for my research on sim2sim.
My setup
ubuntu22.04 mujoco 3.2.3
What's happening? What did you expect?
I use equality/connect to implement closed loop robot. However, it crash when moving. I am sure my relative coordinate is accurate because I get it from solidworks. I expect the two hole site of the two link are aligned to each other.
https://github.com/user-attachments/assets/e9734706-b7ad-432b-ab8d-09ca11ccebc6
Steps for reproduction
sw file too big to reproduce
Minimal model for reproduction
Code required for reproduction
Confirmations