Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulated Pupper looks like it is stepping on an invisible object #8

Open
222464 opened this issue Apr 11, 2020 · 2 comments
Open

Simulated Pupper looks like it is stepping on an invisible object #8

222464 opened this issue Apr 11, 2020 · 2 comments

Comments

@222464
Copy link

222464 commented Apr 11, 2020

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.

@Nate711
Copy link
Contributor

Nate711 commented Apr 11, 2020

Good catch, I'm guessing pybullet is incorrectly parsing the mjcf.

@222464
Copy link
Author

222464 commented Apr 12, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants