-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Runtime switch to read transforms from GPU. #5411
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,7 +37,13 @@ | |
| # By setting OVRTX_SKIP_USD_CHECK, we prevent the C library from loading the pxr Python package. | ||
| os.environ["OVRTX_SKIP_USD_CHECK"] = "1" | ||
|
|
||
| import ovrtx | ||
| from ovrtx import Device, PrimMode, Renderer, RendererConfig, Semantic | ||
| from packaging.version import Version | ||
|
|
||
| # In previous versions of ovrtx, there was a bug where we would have to set read_gpu_transforms to False. | ||
| # In later versions, we can read transforms from GPU. | ||
| _OVRTX_READ_GPU_TRANSFORMS = Version(ovrtx.__version__) > Version("0.2.0") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
try:
_OVRTX_READ_GPU_TRANSFORMS = Version(ovrtx.__version__) > Version("0.2.0")
except Exception:
_OVRTX_READ_GPU_TRANSFORMS = False |
||
|
|
||
| from isaaclab.renderers.base_renderer import BaseRenderer | ||
| from isaaclab.utils.math import convert_camera_frame_orientation_convention | ||
|
|
@@ -171,7 +177,7 @@ def initialize(self, sensor: SensorBase): | |
| OVRTX_CONFIG = RendererConfig( | ||
| log_file_path=self.cfg.log_file_path, | ||
| log_level=self.cfg.log_level, | ||
| read_gpu_transforms=False, | ||
| read_gpu_transforms=_OVRTX_READ_GPU_TRANSFORMS, | ||
| ) | ||
| self._renderer = Renderer(OVRTX_CONFIG) | ||
| assert self._renderer, "Renderer should be valid after creation" | ||
|
|
||
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.
The comment states the bug existed in "previous versions," but the threshold
> Version("0.2.0")treats0.2.0itself as a buggy version (leavesread_gpu_transforms=False). If the GPU-transform fix was introduced in0.2.0(rather than strictly after it), the condition should be>= Version("0.2.0"). Worth confirming the exact release that introduced the fix.