Skip to content

Commit fccda6e

Browse files
author
David Hoeller
authored
Fixes the valid configs test in lab_assets extension (#647)
# Description Since the LiDAR configuration was added to the assets extension, the `test_valid_configs` test is failing. This MR removes sensors from configuration testing. The current set-up is not suitable for sensors, which require additional set-up (like creating a prim first or adding a mesh for the LiDAR). ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] 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 - [ ] 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
1 parent f3c7fe5 commit fccda6e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/extensions/omni.isaac.lab_assets/test/test_valid_configs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import omni.isaac.lab_assets as lab_assets # noqa: F401
2323

2424
from omni.isaac.lab.assets import AssetBase, AssetBaseCfg
25-
from omni.isaac.lab.sensors import SensorBase, SensorBaseCfg
2625
from omni.isaac.lab.sim import build_simulation_context
2726

2827

@@ -32,12 +31,12 @@ class TestValidEntitiesConfigs(unittest.TestCase):
3231
@classmethod
3332
def setUpClass(cls):
3433
# load all registered entities configurations from the module
35-
cls.registered_entities: dict[str, AssetBaseCfg | SensorBaseCfg] = {}
34+
cls.registered_entities: dict[str, AssetBaseCfg] = {}
3635
# inspect all classes from the module
3736
for obj_name in dir(lab_assets):
3837
obj = getattr(lab_assets, obj_name)
3938
# store all registered entities configurations
40-
if isinstance(obj, (AssetBaseCfg, SensorBaseCfg)):
39+
if isinstance(obj, AssetBaseCfg):
4140
cls.registered_entities[obj_name] = obj
4241
# print all existing entities names
4342
print(">>> All registered entities:", list(cls.registered_entities.keys()))
@@ -58,7 +57,7 @@ def test_asset_configs(self):
5857
# name the prim path
5958
entity_cfg.prim_path = "/World/asset"
6059
# create the asset / sensors
61-
entity: AssetBase | SensorBase = entity_cfg.class_type(entity_cfg) # type: ignore
60+
entity: AssetBase = entity_cfg.class_type(entity_cfg) # type: ignore
6261

6362
# play the sim
6463
sim.reset()

0 commit comments

Comments
 (0)