Skip to content

Adds Unit Tests for NewtonWarpRenderer#4703

Open
daniela-hase wants to merge 2 commits intoisaac-sim:developfrom
daniela-hase:dev/warp-renderer-unit-test
Open

Adds Unit Tests for NewtonWarpRenderer#4703
daniela-hase wants to merge 2 commits intoisaac-sim:developfrom
daniela-hase:dev/warp-renderer-unit-test

Conversation

@daniela-hase
Copy link

Description

Added Unit Tests for NewtonWarpRenderer

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 Feb 24, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

This PR contains bug fixes for the Newton Warp Renderer that enable unit tests to pass.

Changes:

  • Removed unused self.sensor field in RenderData.__init__()
  • Fixed tensor conversion in RenderData.update() by properly converting positions tensor to warp vec3f view
  • Added defensive null check for _annotators in TiledCamera.__del__() to prevent AttributeError during cleanup

Note: Despite the PR title "Added Unit Tests for NewtonWarpRenderer", no new test files were added in this PR. The changes fix issues that were preventing existing tests from passing.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-contained bug fixes that improve code robustness. The removal of unused code and defensive null checks reduce potential runtime errors. The tensor conversion fix ensures proper data types for warp operations.
  • No files require special attention

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/renderers/newton_warp_renderer.py Removed unused self.sensor field and fixed tensor view conversion for positions in transform update
source/isaaclab/isaaclab/sensors/camera/tiled_camera.py Added null check for _annotators in destructor to prevent potential attribute error during cleanup

Last reviewed commit: de26f15

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@kellyguo11 kellyguo11 changed the title Added Unit Tests for NewtonWarpRenderer Adds Unit Tests for NewtonWarpRenderer Feb 24, 2026
"""Use CUDA if available, else skip."""
if not torch.cuda.is_available():
pytest.skip("CUDA not available")
return "cuda:0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the newton renderer work on CPU as well?

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

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants