Repository navigation
fix arccos boundaries - #3934
Merged
Merged
Conversation
omichel
previously requested changes
Nov 18, 2021
Member
|
Please fix the clang-format failure. |
ad-daniel
added a commit
that referenced
this pull request
Nov 18, 2021
* Fix auto-regeneration crash (#3869) * Fix auto-regeneration crash * Fix typo * Changelog entry * Proper fix * Update src/webots/nodes/utils/WbSupervisorUtilities.cpp Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Fix Clang format Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update discord docs. (#3877) Co-authored-by: DavidMansolino <DavidMansolino@github.com> * Fixed line endings (#3880) * Fixed line endings * added driver.def * Added car.def * Update Solid.wrl (#3881) * Fix lights cast shadow (#3883) * Fix visibility distance * remove comment * max value + comment * Update src/wren/Scene.cpp Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * clang format Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Add supervisor tutorial (#3882) * Beginning * Handson 2 * Hands-on 3 * continuation * hands-on 4 * format * format test * test * Finalize * Finalize * Fix sources * Fix errors * Fix referenceS * Remove reference * Fix * Add function links * Fix * Update docs/guide/tutorial-8-the-supervisor.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Review fixes * minor * Fix * Fix matlab Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Cleanup wheel acceleration computation (#3854) * Fix * fix * Update driver.c Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update discord docs. (#3929) Co-authored-by: DavidMansolino <DavidMansolino@github.com> * fix arccos boundaries (#3934) * fix acos boundaries + add ToString * include boundaries for performance * fix clang Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: DavidMansolino <DavidMansolino@github.com> Co-authored-by: Benjamin Délèze <benjamin.deleze@cyberbotics.com> Co-authored-by: joachimhgg <48200998+joachimhgg@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is related to these two issues #3556 and #3915 and the PR #3741. The bug came from the
clampedAcosfunction inWbMathsUtilities.hppThe boundaries of acos are [0,pi] for the values between [-1,1].
So the clamp should happen for
value]-1,1[ and take the value 0 or pi. However, for performance reason we can clamp between [-1,1].Otherwise, The
NaNissue can be reproduced by sending a rotation exactly equals to M_PI [0, 0, 1,3.14159265358979323].In addition, I added a
ToStringfunction toWbAxisAngleClass and a default precision to thetoStringfunction ofWbRotationClass.