Open 222464 opened 4 years ago
Good catch, I'm guessing pybullet is incorrectly parsing the mjcf.
Some things I discovered:
The original MJCF file has damping factors over 1. I don't think this is permitted in Bullet, not sure why it works still actually - my guess is that it overshoots the damping in a way that makes it nearly equivalent to a damping value between 0 and 1. Interestingly, it does NOT work when the MJCF is converted to URDF (using the pybullet converter), probably since the conversion clamped it. I had to go in and reducing the damping values, as they should be, since during the conversion they became clamped to 1.0 (unstable) which led the model to bug around and fly through the air. I recommend fixing the damping values to either 0 or some small value like 0.01 in the original file.
The issue of the "invisible object" still appears, but differently, when converted to URDF. I thought it might still be the moments, so I created a moment recalculation script (with xmltodict) that goes through and updates the inertia tensors using the formulas from Wikipedia. Unfortunately, this made no difference it seems - it still looks like it gets stuck on some invisible object.
The AI I wrote can compensate for the weird buggy physics, but it would of course be nice to fix the simulation itself!
I'll let you know if I find anything else!
When the Pupper simulator (sim branch) is run, and one looks at the robot from the side view, one can see that the physics are a bit wonky for the front legs. It looks like it is stepping on some invisible object over and over. I am not sure what causes this, my first thought was that the inertia tensor might be off. But, after playing with that a bit I don't think that is the case.