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

Gravity breaks revolute joint's angle limits #553

Open
exoexo-dev opened this issue Nov 9, 2024 · 1 comment
Open

Gravity breaks revolute joint's angle limits #553

exoexo-dev opened this issue Nov 9, 2024 · 1 comment

Comments

@exoexo-dev
Copy link
Contributor

exoexo-dev commented Nov 9, 2024

In 3D in a chain of multiple dynamic bodies connected via revolute joints with specified angle limits (in a setup similar to crates/avian3d/examples/chain_3d.rs where the first body kinematic), the bodies that "carry" other bodies connected to them break out of their joint's limits.

For example, in a setup with 10 bodies and angle limit set to a const PI / 4.0 (same in min and max) this happens:

Screenshot from 2024-11-09 20-18-16

When the gravity is switched off the bodies settle in a circle as expected (note that 2 bodies are overlapping here):

Screenshot from 2024-11-09 20-49-33

Changing the density of the bodies doesn't seem to have any effect, but change in gravity does. In here it's increased from the first screenshot, which forces the bodies break out further out of their limits:

Screenshot from 2024-11-09 20-52-25

edit: all the joints have compliance set to 0.0

@exoexo-dev
Copy link
Contributor Author

My temporary hacky workaround is to multiply correction calculated in fn apply_angle_limits by some constant > 1 so that it "overpowers" the gravity

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

1 participant