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

Uses new XDisplacement func to check X displacement #1655

Closed
wants to merge 1 commit into from

Conversation

onurtore
Copy link
Contributor

@onurtore onurtore commented Aug 17, 2022

🦟 Bug fix

Fixes gazebosim/gz-common#393

Summary

Uses new XDisplacement func introduced in here to check XDisplacement.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@onurtore onurtore requested a review from iche033 as a code owner August 17, 2022 17:25
@onurtore onurtore changed the title Uses new XDisplacement func to XDisplacement Uses new XDisplacement func to check X displacement Aug 17, 2022
@onurtore
Copy link
Contributor Author

@ahcorde, reminder for the tag.

@ahcorde ahcorde added the needs upstream release Blocked by a release of an upstream library label Aug 17, 2022
@ahcorde
Copy link
Contributor

ahcorde commented Aug 18, 2022

It requires this PR gazebosim/gz-common#411

@azeey
Copy link
Contributor

azeey commented Feb 13, 2023

@luca-della-vedova Is this something we need for Harmonic?

@luca-della-vedova
Copy link
Member

@luca-della-vedova Is this something we need for Harmonic?

This is also a controversial change.

Without this change, we check only the root node for a "sufficient" displacement in X before we set the interpolate_x flag in the actor animation.
The purpose is to make sure that we don't end up in cases where we enable X interpolation yet there is a very small (or zero) range of x movement in the root node.

This function instead would return true if any of the nodes in the actor moves in X by a non negligible amount, which is probably always going to happen, for example if a standing person was to move its hand a bit that would already be above threshold and this would enable X interpolation.
However, when doing the actual interpolation we will still need a single value to divide by, and that value will be the X displacement of the root node (here).

For this reason I'm afraid this PR would end up actually creating issues since we will end up in that code path even when the root node has 0 (or very small) displacement, causing issues that could go from numerical instability (i.e. when dividing by very small values) all the way to division by zero, NaN propagation and exceptions being thrown down the line.

For this reason my recommendation would be not to merge this PR.

@azeey
Copy link
Contributor

azeey commented Mar 7, 2023

Thanks for the explanation @luca-della-vedova, even though I don't have enough context to fully understand it. I'll go ahead and close the PR.

@azeey azeey closed this Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs upstream release Blocked by a release of an upstream library
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants