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

Prevent crash when objects move to invalid poses #706

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Dec 18, 2024

🦟 Bug fix

Fixes #661

Summary

DART seems to compute invalid poses for certain objects (e.g. Capsule, Ellipse) with large accelerations. The computed poses end up with nan values resulting in a crash. This patch detects this condition and reassigns the poses to the last known poses and resets velocities to zero to prevent the crash.

Test it

gz sim -v4 rolling_shapes.sdf -z 1000000 -s -r

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

DART seems to compute invalid poses for certain objects (e.g. Capsule, Ellipse) with large accelerations. The computed poses end up with `nan` values resulting in a crash. This patch detects this condition and reassigns the poses to the last known poses and resets velocities to zero to prevent the crash.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested a review from scpeters as a code owner December 18, 2024 23:06
@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Dec 18, 2024
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey merged commit a369e18 into gazebosim:gz-physics8 Dec 19, 2024
10 checks passed
@azeey
Copy link
Contributor Author

azeey commented Dec 19, 2024

@Mergifyio backport gz-physics7

@azeey azeey deleted the prevent_crash branch December 19, 2024 20:32
Copy link

mergify bot commented Dec 19, 2024

backport gz-physics7

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Dec 19, 2024
DART seems to compute invalid poses for certain objects (e.g. Capsule, Ellipse) with large accelerations. The computed poses end up with `nan` values resulting in a crash. This patch detects this condition and reassigns the poses to the last known poses and resets velocities to zero to prevent the crash.

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit a369e18)
azeey added a commit that referenced this pull request Dec 19, 2024
DART seems to compute invalid poses for certain objects (e.g. Capsule, Ellipse) with large accelerations. The computed poses end up with `nan` values resulting in a crash. This patch detects this condition and reassigns the poses to the last known poses and resets velocities to zero to prevent the crash.

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
(cherry picked from commit a369e18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Crash with assertion failure "aabbBound >= dMinIntExact && aabbBound < dMaxIntExact"
3 participants