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

Fix exception message when center of mass is NAN. #22016

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mitiguy
Copy link
Contributor

@mitiguy mitiguy commented Oct 10, 2024

Resolves issue #22017

When an invalid center of mass (e.g., containing NAN or INF) is used in an SpatialInertia() constructor, a confusing exception message is issued, namely:

"CalcPrincipalMomentsAndMaybeAxesOfInertia(): Unable to calculate eigenvalues or eigenvectors of the 3x3 matrix associated with a RotationalInertia."

This PR creates a better message that more clearly communicate that the problem is with the center of mass position vector.

This change is Reviewable

@mitiguy mitiguy added priority: medium status: do not review release notes: fix This pull request contains fixes (no new features) labels Oct 10, 2024
@mitiguy mitiguy changed the title [WIP] Fix exception message when center of mass is NAN. Fix exception message when center of mass is NAN. Oct 10, 2024
Copy link
Contributor Author

@mitiguy mitiguy left a comment

Choose a reason for hiding this comment

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

Feature review +@sherm1

Reviewable status: LGTM missing from assignee sherm1(platform), needs at least two assigned reviewers

Copy link
Member

@sherm1 sherm1 left a comment

Choose a reason for hiding this comment

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

I'm not clear on why this is needed -- let's discuss in the issue #22017

Reviewable status: LGTM missing from assignee sherm1(platform), needs at least two assigned reviewers

Copy link
Contributor Author

@mitiguy mitiguy left a comment

Choose a reason for hiding this comment

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

Done -- I added this to our discussion.

Reviewable status: LGTM missing from assignee sherm1(platform), needs at least two assigned reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: fix This pull request contains fixes (no new features)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants