[BUG FIX] Fix mixed precision issue.#1395
Closed
abhijitmajumdar wants to merge 3 commits intoGenesis-Embodied-AI:mainfrom
Closed
[BUG FIX] Fix mixed precision issue.#1395abhijitmajumdar wants to merge 3 commits intoGenesis-Embodied-AI:mainfrom
abhijitmajumdar wants to merge 3 commits intoGenesis-Embodied-AI:mainfrom
Conversation
3ca9cb5 to
b7e684b
Compare
Collaborator
|
Could you rather modify |
b7e684b to
81869a9
Compare
81869a9 to
18680a1
Compare
Collaborator
|
I will try to clean up first the codebase to avoid mixing types in computations. Then we can merge this one. Because casting would slow down performance. |
duburcqa
approved these changes
Jul 11, 2025
Collaborator
|
Superseded by #1395 |
Collaborator
|
After thinking twice, I would rather make sure that we do no mix different precision instead of hiding this mistake by cast the input arguments. |
Contributor
Author
Collaborator
|
Superseded by #1398 |
Collaborator
|
It should be merged in less than 1 hour. Waiting for the CI to pass! |
Collaborator
|
Thank you for your efforts! |
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.
Description
When running camera renders across multiple environments with camera attached to a link (say the robot EE), the following error shows up
This is a result of a feature I previously added and subsequent changes added to Genesis, and only triggers in the aforementioned scenario.
TLDR:
move_to_attachis called when camera attached to a link is being renderedenv_idx, theposandquatare of typenp.float32(default, as specified by the simulation precision) here, howeverenvs_offsetare returned asnp.float64, which causes the finallink_posandlink_quatpassed togu.trans_quat_to_Tto have different typestrans_quat_to_Tcreates aTmatrix passed down asoutwhich is generated usingpos.dtype, but later whenquatderivates are added toTthe above error occurs due to type mismatch (see traceback above togeom.py::trans_quat_to_T -> quat_to_R -> _np_quat_to_R)Related Issue
Resolves Genesis-Embodied-AI/Genesis#
How Has This Been / Can This Be Tested?
Same steps described in #1323
Checklist:
Submitting Code Changessection of CONTRIBUTING document.