Simulating a Humanoid Robot (Fun with PhysX Joints and Transforms)

Over the course of the last few weeks I have been developing a humanoid robot simulation for robotSim

This has not been a very easy task and I seriously thought that it would take a lot less time than it did.

After getting all of the kinks out of the 3d model we started to rig the model with the different physX joints that the Unity engine had available. We first tried hinge joints and then configurable joints ( not a lot of good documentation on these joints). After the model was rigged with the joints we found that there was some very large instability in the physics calculations and the joints started to jitter, come out of their sockets and magically move the robot across the floor. We tried different parameters, bumping up the solver iteration count, reducing the projections distance / angle values and setting configure in world space true. This did help but their was still lots of jitter.

At this point we had the bright idea to just manually rotate the joints around their respective pivot points using transforms. This worked great, the robot did not jitter it could stand up and do basic stationary moves. Now, if the world was fair everything would JUST work! But it is not and we now encountered the problem of the robot not being able to move. When we start the walking algorithm the joints move like they should, but the robot starts to move on the spot! The problem looked to be that the feet were slipping with the floor.

After changing the materials of the floor / feet to rubber and doing some major testing we found that using transforms to move the joints does not actually work. What looks to be happening is that when we manually move the joints we are actually bypassing the physics calculations which causes the feet to slip because legs are not being updated by the physic engine.  

Now it is back to using joints again.  I hope this time I can get them to work properly!!!

You may also like...