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

Use double when handling qreal orient_ #114

Merged
merged 1 commit into from
Dec 20, 2021
Merged

Conversation

squizz617
Copy link

When the value of orient_ crosses the boundary of float, e.g., when
cmd_vel.angular.z = -4.0e+214, normalizeAngle returns nan.
As a result, x, y, and theta all become nan, and turtle disappears
from the frame.

As qreal corresponds to double, normalizeAngle should be taking param
angle as double, and return double accordingly.

@audrow audrow changed the base branch from dashing-devel to rolling-devel December 20, 2021 19:28
When the value of `orient_` crosses the boundary of `float`, e.g., when
`cmd_vel.angular.z = -4.0e+214`, `normalizeAngle` returns `nan`.
As a result, `x`, `y`, and `theta` all become `nan`, and turtle disappears
from the frame.

As `qreal` corresponds to `double`, `normalizeAngle` should be taking param
`angle` as `double`, and return `double` accordingly.
Copy link

@audrow audrow left a comment

Choose a reason for hiding this comment

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

This seems like a good fix. Dashing is EOL, so I made this PR target rolling and rebased your commit. Thanks for the PR, @squizz617!

@audrow
Copy link

audrow commented Dec 20, 2021

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

@audrow audrow self-assigned this Dec 20, 2021
@audrow audrow added the bug label Dec 20, 2021
@audrow audrow merged commit 0ca5612 into ros:rolling-devel Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants