Various fixes - #7
Merged
Merged
Conversation
createShapePrimitive() called createShapePrimitiveHelper() a second time on the return instead of returning the already-created shape. This caused every geometry to be built twice and the cached instance to be immediately lost (only held by a weak_ptr in the cache), defeating the cache entirely. https://claude.ai/code/session_01JpfY1C2isv3cgud2grpKro
The normal was computed as (distance * (p1 - p0)).normalized(). When distance is exactly zero this produces a zero vector whose normalization is NaN. Use std::copysign to extract only the sign (+1/-1) so the direction is preserved for negative distances without collapsing to zero. https://claude.ai/code/session_01JpfY1C2isv3cgud2grpKro
The assertion searched pose1 for a key from pose1 (always succeeds) and compared the result against pose2.end(), mixing iterators from different containers which is undefined behavior. Fix by searching pose2 instead, which correctly validates that the key exists in both maps. https://claude.ai/code/session_01JpfY1C2isv3cgud2grpKro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.