I've made a simple quadrapod with rigid body 6 DOF joints - with joint limits so it's only a single DOF per joint (w/without limits doesn't effect end results - I will have limits in the end goal though).

However, I am getting crazy instability. The joints do, rougly, seem to be working - but they just shudder and jitter a lot.

I'm not putting much force on them here. I have set them as dynamic objects, with collision convex hulls (not that boxes made a difference). I have the box ticked that says it disables collisions between jointed objects.

I am using rigid body joints as I intend to move towards some sort of machine learning for gait development - this rules out armatures I believe. Each leg needs to be able to freely translate and rotate in the world coordinate frame - this would allow gait development on uneven terrain, and for the quadrapod to fall over!

Example added below. enter image description here

My blend file is here:


You want something like this? enter image description here

Notice the bottom right of the screen. I have locked the X and Z rotation for all the legs (Both upper and lower).

Alternatively, you could use this method, but it stiffens the joints so it's able to stand:

enter image description here

Notice that I have deselected the Angle X limiter. In addition, I changed the joint type to hinge for all upper limbs.

Alternatively, disregard the modifiers on your upper limbs, and assign them to the lower limbs instead using a hinge pivot like this if you don't want the stiffness of the previous solution:

enter image description here

Note that the hinge modifier only affects the LOCAL X axis, not the global. So you have to re-orientate the limbs like I did to get the local X axis pointing the same way as the global axis (Just for reference, they have to point directly 90 degrees out from your limbs.

If you look closely, you'll see a gap between the lower legs and the main body compared to the back legs. I made this quickly, so I didn't adjust to the 100% accurate values, but you have to tweak the Angle X min/max values to your liking. This will determine how far the legs are allowed to rotate along the X axis. Too high and the legs will go through each other, too low and the lower legs won't connect with the main body when it's laying down. Depending on your needs, these numbers will be different from the ones I gave you, but again, you have to tweak these to your liking. Again, these are local X values relevant to your upper limb.

This deals with your spasm issues.

Hope this helps. Let me know if this wasn't the answer you were looking for.

  • $\begingroup$ Does that lock the rotation with respect to the global frame? If so, I can't really have that - this is a somewhat simplified model, and what about uneven terrain? $\endgroup$ – Kurbo Matematikon Aug 1 '17 at 7:34
  • $\begingroup$ You never told what this would be used for, but you mentioned it's a quadrapod. In my head, the hinges should then behave like our knees and elbows. If the spasms of your models wasn't the issue, please specify it further. Alternatively, you could use bones, much easier to work with than direct mesh physics. $\endgroup$ – FreemoX Aug 1 '17 at 9:42
  • $\begingroup$ Yeah, the hinges should behave like our knees and elbows. But if you lock the rotations on the rigid body themselves, it locks it with respect to the world frame. If the quadrapod is walking on slanted ground, if you lock the rotation, the legs will ALWAYS stay vertical. The end goal is to do some sort of machine learning for gait design. So that's why I'm using rigid body. $\endgroup$ – Kurbo Matematikon Aug 1 '17 at 11:31
  • $\begingroup$ Ahh. Edit your question with that info, it would help resolving your issue. I'll update my answer. $\endgroup$ – FreemoX Aug 1 '17 at 11:40
  • $\begingroup$ Thanks! But why! What is the difference between a 6DOF rigid body constraint and a hinge constraint? Surely the hinge is just a special case of the rigid body? $\endgroup$ – Kurbo Matematikon Aug 1 '17 at 12:34

A bit late, I know but in case it helps anyone else- in my case the instability with the 6DOF was caused because I did not apply the scale of the objects I was linking. When I applied the scale the instability vanished.

tl;dr objects with scaling other than 1,1,1 seem to be the cause for the instability.

ps to apply scale click object>apply>scale


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.