| |
| |
| |
| |
|
|
| from __future__ import annotations |
|
|
| """Launch Isaac Sim Simulator first.""" |
|
|
| from isaaclab.app import AppLauncher |
|
|
| |
| simulation_app = AppLauncher(headless=True).app |
|
|
| """Rest everything follows.""" |
|
|
| import isaaclab.utils.assets as assets_utils |
|
|
|
|
| def test_nucleus_connection(): |
| """Test checking the Nucleus connection.""" |
| |
| assert assets_utils.NUCLEUS_ASSET_ROOT_DIR is not None |
|
|
|
|
| def test_check_file_path_nucleus(): |
| """Test checking a file path on the Nucleus server.""" |
| |
| usd_path = f"{assets_utils.ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd" |
| |
| assert assets_utils.check_file_path(usd_path) == 2 |
|
|
|
|
| def test_check_file_path_invalid(): |
| """Test checking an invalid file path.""" |
| |
| usd_path = f"{assets_utils.ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_xyz.usd" |
| |
| assert assets_utils.check_file_path(usd_path) == 0 |
|
|
|
|
| def test_check_usd_path_with_timeout(): |
| """Test checking a USD path with timeout.""" |
| |
| usd_path = f"{assets_utils.ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_instanceable.usd" |
| |
| assert assets_utils.check_usd_path_with_timeout(usd_path) is True |
|
|
| |
| usd_path = f"{assets_utils.ISAACLAB_NUCLEUS_DIR}/Robots/FrankaEmika/panda_xyz.usd" |
| |
| assert assets_utils.check_usd_path_with_timeout(usd_path) is False |
|
|