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

Add restitution coefficient to ground plane #30

Merged
merged 1 commit into from
Oct 22, 2020
Merged

Conversation

diegoferigo
Copy link
Member

Setting the coefficient of the ground to 1.0 does not change the behaviour of the simulation unless the other body in contact has a coefficient different from 0 (the default).

@traversaro
Copy link
Member

traversaro commented Oct 22, 2020

Setting the coefficient of the ground to 1.0 does not change the behaviour of the simulation unless the other body in contact has a coefficient different from 0 (the default).

Do you have a reference for this? In the SDF docs I only found this docs: http://sdformat.org/spec?ver=1.7&elem=collision#bounce_restitution_coefficient and no info on how the restitution_coefficient is computer for a pair of collision in contact. It would be also useful to know why 1.0 is a good choice.

@diegoferigo
Copy link
Member Author

It is not documented, I got the hint from here, valid also for Gazebo Classic:

True infinite bounce is only achieved if the ground also has the restitution_coefficient set to 1.

I think this approach is similar to what is typically done for mu and mu2. In that case, the ground has typically very high coefficients. If the other body defines mu|mu2, the simulator choses the lower ones.

In this bouncing case, the difference is that there is a [0, 1] range, therefore if the ground has 1 and, by default, the other body has 0, there's no bouncing and the behaviour is what it is expected. I'm not sure, though, how the final coefficient is computed. It could be the multiplication of the two or any other similar operation.

@traversaro
Copy link
Member

Thanks, I opened upstream gazebosim/sdformat#396 to track this.

@diegoferigo diegoferigo merged commit 9912675 into master Oct 22, 2020
@diegoferigo diegoferigo deleted the feature/bounce branch October 22, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants