-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes returned tensor for normals in TiledCamera #4241
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
Conversation
|
Hi reviewers! I wonder if I need to (and how to) create tests and/or update the changelog for this bug fix. |
Mayankm96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix! Could we also modify the unit tests to capture this case?
|
Hi @Mayankm96 , thank you for your reply! I am happy to update the unit tests, but unfortunately I have run into issues running the unit tests for TiledCamera (#4255). |
|
Hi @Mayankm96 ! I have updated the unit test to capture the previous bug. I added an assertion to verify that the norms of the normals should be approximately 1. The previous (buggy) version would fail here because of the shift.
I also updated several existing assertions for the camera data keys in other test cases for I have verified that the fixed code can pass all test cases in the updated unit tests in |
|
If I understand the issue correctly, the fix is discarding the fourth channel before reshaping. But I see implementation added a new output_type called normal_padded, is that needed? |
…al_padded in earlier commits)
|
Hi @ooctipus , thank you. I just realized that adding a new output key was indeed unnecessary. I changed it to a simpler fix. The unit test has been updated accordingly, capturing the previous bug without making unnecessary changes. |
|
Thank you for the fix! |
# Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> <!--Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.--> Fix a bug with `TiledCamera`. The 4-th channel in the "normals" annotator output should be discarded before reshaping into [B, H, W, 3]. Please find more details in the issue below: Fixes isaac-sim#4239 <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Screenshots <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> | Before | After | | ------ | ----- | | <img width="1512" height="742" alt="camera_visualization_before" src="https://github.com/user-attachments/assets/fc4470ea-69c1-4012-a711-164b3c23c9a8" />| <img width="1512" height="742" alt="camera_visualization_fixed" src="https://github.com/user-attachments/assets/22019531-91e1-4614-8418-53fca716dfec" />| ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>

Description
Fix a bug with
TiledCamera. The 4-th channel in the "normals" annotator output should be discarded before reshaping into [B, H, W, 3]. Please find more details in the issue below:Fixes #4239
Type of change
Screenshots
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there