Skip to content

Conversation

@Rabbit-Hu
Copy link

@Rabbit-Hu Rabbit-Hu commented Dec 18, 2025

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

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Before After
camera_visualization_before camera_visualization_fixed

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • 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
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions bot added the isaac-lab Related to Isaac Lab team label Dec 18, 2025
@Rabbit-Hu
Copy link
Author

Hi reviewers! I wonder if I need to (and how to) create tests and/or update the changelog for this bug fix.

@Rabbit-Hu Rabbit-Hu marked this pull request as ready for review December 18, 2025 01:46
Copy link
Contributor

@Mayankm96 Mayankm96 left a 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?

@Mayankm96 Mayankm96 changed the title Fix Bug: incorrect normals in TiledCamera Fixes returned tensor for normals in TiledCamera Dec 18, 2025
@Mayankm96 Mayankm96 added the bug Something isn't working label Dec 18, 2025
@Mayankm96 Mayankm96 moved this to In review in Isaac Lab Dec 18, 2025
@Rabbit-Hu Rabbit-Hu mentioned this pull request Dec 19, 2025
4 tasks
@Rabbit-Hu
Copy link
Author

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).

@Rabbit-Hu Rabbit-Hu requested a review from Mayankm96 December 21, 2025 01:10
@Rabbit-Hu
Copy link
Author

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.

image

I also updated several existing assertions for the camera data keys in other test cases for TiledCamera, as my fix added a new key normals_padded to the data dict.

I have verified that the fixed code can pass all test cases in the updated unit tests in test_tiled_camera.py.

@ooctipus
Copy link
Collaborator

ooctipus commented Dec 21, 2025

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?

@Rabbit-Hu
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

[Bug Report] TiledCamera outputs incorrect normals data due to buffer shift

3 participants