Commit ceb02e2b authored by rwiltz's avatar rwiltz Committed by Kelly Guo

Allows external cameras in XR (#459)

Allows cameras to be enabled when XR mode is active. By default, the
record_demos.py script will strip envs of any
cameras if xr mode is used. If `--enable_cameras` is passed as an
argument to the script, externals cameras will remain
and function.

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

Fixes #2491

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

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)

Please attach before and after screenshots of the change if applicable.

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

- [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
- [x] 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
-->
parent e17495bb
......@@ -22,6 +22,10 @@ app.useFabricSceneDelegate = true
# Temporary, should be enabled by default in Kit soon
rtx.hydra.readTransformsFromFabricInRenderDelegate = true
[settings.isaaclab]
# This is used to check that this experience file is loaded when using cameras
cameras_enabled = true
[dependencies]
"isaaclab.python.xr.openxr" = {}
......
......@@ -38,6 +38,10 @@ rtx.hydra.readTransformsFromFabricInRenderDelegate = true
"omni.kit.xr.system.openxr" = {}
"omni.kit.xr.profile.ar" = {}
[settings.isaaclab]
# This is used to check that this experience file is loaded when using cameras
cameras_enabled = true
[settings]
app.xr.enabled = true
......
......@@ -206,9 +206,9 @@ def create_environment_config(
)
if args_cli.xr:
# External cameras are not supported with XR teleop
# Check for any camera configs and disable them
env_cfg = remove_camera_configs(env_cfg)
# If cameras are not enabled and XR is enabled, remove camera configs
if not args_cli.enable_cameras:
env_cfg = remove_camera_configs(env_cfg)
env_cfg.sim.render.antialiasing_mode = "DLSS"
# modify configuration such that the environment runs indefinitely until
......
......@@ -281,7 +281,7 @@ Changed
:meth:`~isaaclab.utils.math.quat_apply` and :meth:`~isaaclab.utils.math.quat_apply_inverse` for speed.
0.40.12 (2025-05-19)
0.40.13 (2025-05-19)
~~~~~~~~~~~~~~~~~~~~
Fixed
......@@ -291,7 +291,7 @@ Fixed
of assets and sensors.used from the experience files and the double definition is removed.
0.40.11 (2025-01-30)
0.40.12 (2025-01-30)
~~~~~~~~~~~~~~~~~~~~
Added
......@@ -301,7 +301,7 @@ Added
in the simulation.
0.40.10 (2025-05-16)
0.40.11 (2025-05-16)
~~~~~~~~~~~~~~~~~~~~
Added
......@@ -316,8 +316,8 @@ Changed
resampling call.
0.40.9 (2025-05-16)
~~~~~~~~~~~~~~~~~~~
0.40.10 (2025-05-16)
~~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
......@@ -325,7 +325,7 @@ Fixed
* Fixed penetration issue for negative border height in :class:`~isaaclab.terrains.terrain_generator.TerrainGeneratorCfg`.
0.40.8 (2025-05-20)
0.40.9 (2025-05-20)
~~~~~~~~~~~~~~~~~~~
Changed
......@@ -340,7 +340,7 @@ Added
* Added :meth:`~isaaclab.utils.math.rigid_body_twist_transform`
0.40.7 (2025-05-15)
0.40.8 (2025-05-15)
~~~~~~~~~~~~~~~~~~~
Fixed
......@@ -354,14 +354,23 @@ Fixed
unused USD camera parameters.
0.40.6 (2025-05-14)
0.40.7 (2025-05-14)
~~~~~~~~~~~~~~~~~~~
* Added a new attribute :attr:`articulation_root_prim_path` to the :class:`~isaaclab.assets.ArticulationCfg` class
to allow explicitly specifying the prim path of the articulation root.
0.40.5 (2025-05-14)
0.40.6 (2025-05-14)
~~~~~~~~~~~~~~~~~~~
Changed
^^^^^^^
* Enabled external cameras in XR.
0.40.5 (2025-05-23)
~~~~~~~~~~~~~~~~~~~
Added
......
......@@ -595,7 +595,7 @@ class AppLauncher:
def _resolve_camera_settings(self, launcher_args: dict):
"""Resolve camera related settings."""
enable_cameras_env = int(os.environ.get("ENABLE_CAMERAS", 0))
enable_cameras_arg = launcher_args.pop("enable_cameras", AppLauncher._APPLAUNCHER_CFG_INFO["enable_cameras"][1])
enable_cameras_arg = launcher_args.get("enable_cameras", AppLauncher._APPLAUNCHER_CFG_INFO["enable_cameras"][1])
enable_cameras_valid_vals = {0, 1}
if enable_cameras_env not in enable_cameras_valid_vals:
raise ValueError(
......@@ -704,7 +704,8 @@ class AppLauncher:
isaaclab_app_exp_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), *[".."] * 4, "apps")
if self._sim_experience_file == "":
# check if the headless flag is set
if self._enable_cameras:
# xr rendering overrides camera rendering settings
if self._enable_cameras and not self._xr:
if self._headless and not self._livestream:
self._sim_experience_file = os.path.join(
isaaclab_app_exp_path, "isaaclab.python.headless.rendering.kit"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment