Self-Collision and Equality Constraints Challenges #2380
Replies: 1 comment 2 replies
-
Hello, Without the assets (which of course you might not be allowed to share) I can't really load your scene to test it, however here are steps you can take to debug it yourself: In the Render option of the Simulate window, enable the contact point visualisation flag. Then, in the "Label" dropdown, select "Contact". This should label which geoms are colliding so you can figure out the sources of the internal collisions. MuJoCo turns each individual mesh geom into its convex hull, which adds extra volume to parts of your robot. This can cause internal collisions to arise if two originally concave parts neatly fit together in the original model. If you confirm that the colliding parts would not collide in real life, you can disable collisions selectively for those geoms. Search "collision filtering", You could also consider turning off collisions for all meshes, and adding invisible, massless primitive geoms (boxes, cylinders, capsules), e.g., by setting their Closed loops: I'd also recommend creating a "toy" case for your kinematic loop where you remove the rest of your robot and use primitive shapes, to help you debug specifically that aspect. A second, perhaps even better method is to model your linkage with joint equality constraints! You can define polynomial relationships between the two joints on either side of the linkage, creating the effect of your second bar. In this case you do not need to add the additional joints and bodies for your second bar, and wouldn't need a connect or weld equality constraint. However, if it is still unclear, let us know! |
Beta Was this translation helpful? Give feedback.
-
Intro
Hi!
I am a student at Berliner Hochschule für Technik in Berlin, I use MuJoCo for my research on a passive dynamic walker.
My setup
My setup involves MuJoCo 3.2.4 on a Mac, and I work with XML files that are simulated using Python. The passive dynamic walker is designed in SolidWorks. From there, I export the CAD model as a URDF file and use the urdf2mjcf function to convert the URDF file into an XML file with STL files.
My question
I am encountering an issue where, as soon as I drop this XML file into MuJoCo and run the simulation, the walker starts jittering and fidgeting. However, when I turn off collisions, the walker "behaves" normally.
chaos1.mov
Additionally, I have another question. Our knee, which connects the hip (e.g., hip_l in the XML) to the lower leg (e.g., foot_l1), is composed of two bars. This means the lower leg essentially requires two parents, which is not possible to represent in the XML structure. In another discussion, I read about using equality constraints for kinematic loops, but unfortunately, it didn't seem to work. Is there another way to achieve this, or did I make a mistake?
Minimal model and/or code that explain my question
Model:
XML
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions