Unverified Commit aaab27b7 authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Fixes loading of material from MDL file (#268)

# Description

The Nucleus directory for materials has changed in 2023.1. They are now
directly inside `NVIDIA/Materials` instead of `NVIDIA/Assets/Materials`.
This MR fixes the referenced directory.

## Type of change

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

## Screenshots

This is how the rough terrain looks like now:

![shingle_ground](https://github.com/isaac-orbit/orbit/assets/12863862/c561f664-22bb-45d1-a713-9d95ec48feda)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] 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
parent f98eebce
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.9.54" version = "0.9.55"
# Description # Description
title = "ORBIT framework for Robot Learning" title = "ORBIT framework for Robot Learning"
......
Changelog Changelog
--------- ---------
0.9.55 (2023-12-03)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed the Nucleus directory path in the :attr:`omni.isaac.orbit.utils.assets.NVIDIA_NUCLEUS_DIR`.
Earlier, it was referring to the ``NVIDIA/Assets`` directory instead of ``NVIDIA``.
0.9.54 (2023-11-29) 0.9.54 (2023-11-29)
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
......
...@@ -60,11 +60,12 @@ class MdlFileCfg(VisualMaterialCfg): ...@@ -60,11 +60,12 @@ class MdlFileCfg(VisualMaterialCfg):
NVIDIA Omniverse provides various MDL materials in the NVIDIA Nucleus. NVIDIA Omniverse provides various MDL materials in the NVIDIA Nucleus.
To use these materials, you can set the path of the material in the nucleus directory To use these materials, you can set the path of the material in the nucleus directory
using the ``{NVIDIA_NUCLEUS_DIR}`` variable. using the ``{NVIDIA_NUCLEUS_DIR}`` variable. This is internally resolved to the path of the
NVIDIA Nucleus directory on the host machine through the attribute
:attr:`omni.isaac.orbit.utils.assets.NVIDIA_NUCLEUS_DIR`.
For example, to use the "Aluminum_Anodized" material, you can set the path to:
For example, to use the "Brick_Wall_Brown" material, you can set the path to: ``{NVIDIA_NUCLEUS_DIR}/Materials/Base/Metals/Aluminum_Anodized.mdl``.
``{NVIDIA_NUCLEUS_DIR}/Materials/Brick_Wall_Brown/Brick_Wall_Brown.mdl``.
""" """
project_uvw: bool | None = None project_uvw: bool | None = None
"""Whether to project the UVW coordinates of the material. Defaults to None. """Whether to project the UVW coordinates of the material. Defaults to None.
...@@ -76,6 +77,11 @@ class MdlFileCfg(VisualMaterialCfg): ...@@ -76,6 +77,11 @@ class MdlFileCfg(VisualMaterialCfg):
If None, then the default setting in the MDL material will be used. If None, then the default setting in the MDL material will be used.
""" """
texture_scale: tuple[float, float] | None = None
"""The scale of the texture. Defaults to None.
If None, then the default setting in the MDL material will be used.
"""
@configclass @configclass
......
...@@ -32,13 +32,13 @@ if nucleus_utils.get_assets_root_path() is None: ...@@ -32,13 +32,13 @@ if nucleus_utils.get_assets_root_path() is None:
carb.log_error(msg) carb.log_error(msg)
raise RuntimeError(msg) raise RuntimeError(msg)
NVIDIA_NUCLEUS_DIR = nucleus_utils.get_nvidia_asset_root_path() NVIDIA_NUCLEUS_DIR = f"{nucleus_utils.get_assets_root_path()}/NVIDIA"
"""Path to the root directory on the NVIDIA Nucleus Server.""" """Path to the root directory on the NVIDIA Nucleus Server."""
ISAAC_NUCLEUS_DIR = f"{nucleus_utils.get_assets_root_path()}/Isaac" ISAAC_NUCLEUS_DIR = f"{nucleus_utils.get_assets_root_path()}/Isaac"
"""Path to the `Isaac` directory on the NVIDIA Nucleus Server.""" """Path to the `Isaac` directory on the NVIDIA Nucleus Server."""
ISAAC_ORBIT_NUCLEUS_DIR = f"{nucleus_utils.get_assets_root_path()}/Isaac/Samples/Orbit" ISAAC_ORBIT_NUCLEUS_DIR = f"{ISAAC_NUCLEUS_DIR}/Samples/Orbit"
"""Path to the `Isaac/Samples/Orbit` directory on the NVIDIA Nucleus Server.""" """Path to the `Isaac/Samples/Orbit` directory on the NVIDIA Nucleus Server."""
......
...@@ -55,6 +55,10 @@ class MySceneCfg(InteractiveSceneCfg): ...@@ -55,6 +55,10 @@ class MySceneCfg(InteractiveSceneCfg):
static_friction=1.0, static_friction=1.0,
dynamic_friction=1.0, dynamic_friction=1.0,
), ),
visual_material=sim_utils.MdlFileCfg(
mdl_path="{NVIDIA_NUCLEUS_DIR}/Materials/Base/Architecture/Shingles_01.mdl",
project_uvw=True,
),
debug_vis=False, debug_vis=False,
) )
# robots # robots
...@@ -74,6 +78,10 @@ class MySceneCfg(InteractiveSceneCfg): ...@@ -74,6 +78,10 @@ class MySceneCfg(InteractiveSceneCfg):
prim_path="/World/light", prim_path="/World/light",
spawn=sim_utils.DistantLightCfg(color=(0.75, 0.75, 0.75), intensity=3000.0), spawn=sim_utils.DistantLightCfg(color=(0.75, 0.75, 0.75), intensity=3000.0),
) )
sky_light = AssetBaseCfg(
prim_path="/World/skyLight",
spawn=sim_utils.DomeLightCfg(color=(0.13, 0.13, 0.13), intensity=1000.0),
)
## ##
......
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