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 <os@skarvtech.com>

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

Signed-off-by: Øystein Sture <os@skarvtech.com>

* Add float/double NaN/Inf tests

Signed-off-by: Øystein Sture <os@skarvtech.com>

* Increase precision of float32 bounds

Signed-off-by: Øystein Sture <os@skarvtech.com>

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

Signed-off-by: Øystein Sture <os@skarvtech.com>

* Disable bounds test for float64 on IEEE 754 compatible systems

Signed-off-by: Øystein Sture <os@skarvtech.com>

* Disable bounds test for float64 on IEEE 754 compatible systems

Signed-off-by: Øystein Sture <os@skarvtech.com>

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

Signed-off-by: Øystein Sture <os@skarvtech.com>

* Change decode error mode to replace (#176)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* Replace rosidl_cmake imports with rosidl_pycommon (#177)

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Delete trailing whitespace

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Split fail case array check tests into two

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

Signed-off-by: Øystein Sture <os@skarvtech.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Jacob Perron <jacob@openrobotics.org>
Co-authored-by: Shane Loretz <sloretz@osrfoundation.org>
* Replaced equal_nan for numpy<1.19

Signed-off-by: Crola1702 <cristobal.arroyo@ekumenlabs.com>
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 <benwolsieffer@gmail.com>
@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