Skip to content

Humble: Backport NaN fixes#188

Merged
clalancette merged 3 commits intohumblefrom
clalancette/humble-backport-nan-fixes
Nov 8, 2022
Merged

Humble: Backport NaN fixes#188
clalancette merged 3 commits intohumblefrom
clalancette/humble-backport-nan-fixes

Conversation

@clalancette
Copy link
Copy Markdown
Contributor

This PR backports #167, #182, and #185 . The combination of those PRs allows NaN to be successfully decoded in Python code, which fixes a number of issues that users have reported, including ros2/ros2#1341.

Tested locally to at least fix that latter issue.

@sloretz @fujitatomoya I'd appreciate review from both of you.

oysstu and others added 3 commits November 7, 2022 16:11
* Invert bounds check in order to permit floating point NaN values

Signed-off-by: Øystein Sture <[email protected]>

* Allow floating point numbers set to Inf to pass bounds check

Signed-off-by: Øystein Sture <[email protected]>

* Add float/double NaN/Inf tests

Signed-off-by: Øystein Sture <[email protected]>

* Increase precision of float32 bounds

Signed-off-by: Øystein Sture <[email protected]>

* Only perform float64 bounds check on non-compliant IEEE 754 systems

Signed-off-by: Øystein Sture <[email protected]>

* Disable bounds test for float64 on IEEE 754 compatible systems

Signed-off-by: Øystein Sture <[email protected]>

* Disable bounds test for float64 on IEEE 754 compatible systems

Signed-off-by: Øystein Sture <[email protected]>

* Resolve failing nan/inf test by comparing the same types

Signed-off-by: Øystein Sture <[email protected]>

* Change decode error mode to replace (#176)

Signed-off-by: Tomoya Fujita <[email protected]>

* Replace rosidl_cmake imports with rosidl_pycommon (#177)

Signed-off-by: Jacob Perron <[email protected]>

* Delete trailing whitespace

Signed-off-by: Shane Loretz <[email protected]>

* Split fail case array check tests into two

Signed-off-by: Shane Loretz <[email protected]>

Signed-off-by: Øystein Sture <[email protected]>
Signed-off-by: Tomoya Fujita <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Shane Loretz <[email protected]>
Co-authored-by: Tomoya Fujita <[email protected]>
Co-authored-by: Jacob Perron <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
* Replaced equal_nan for numpy<1.19

Signed-off-by: Crola1702 <[email protected]>
NumPy was being imported in the template code (not the template output) for
apparently no reason. This was causing problems when cross-compiling, where
NumPy is only available for the target platform.

Signed-off-by: Ben Wolsieffer <[email protected]>
@clalancette clalancette changed the title Backport NaN fixes Humble: Backport NaN fixes Nov 7, 2022
@clalancette
Copy link
Copy Markdown
Contributor Author

clalancette commented Nov 7, 2022

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Copy link
Copy Markdown
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@clalancette clalancette merged commit c881598 into humble Nov 8, 2022
@clalancette clalancette deleted the clalancette/humble-backport-nan-fixes branch November 8, 2022 16:01
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

Successfully merging this pull request may close these issues.

7 participants