-
Notifications
You must be signed in to change notification settings - Fork 5
Add add ons to set configurations #308
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Copyright (c) 2025, The Isaac Lab Arena Project Developers (https://github.com/isaac-sim/IsaacLab-Arena/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
|
|
||
| from isaaclab_arena.tests.utils.subprocess import run_simulation_app_function | ||
|
|
||
| HEADLESS = False | ||
|
|
||
|
|
||
| def _test_object_with_cfg_addons(simulation_app): | ||
|
|
||
| from isaaclab_arena.assets.object_base import ObjectType | ||
| from isaaclab_arena.assets.object_library import LibraryObject | ||
| from isaaclab_arena.utils.pose import Pose | ||
|
|
||
| class ConeWithCfgAddons(LibraryObject): | ||
| """ | ||
| Cone with cfg addons. | ||
| """ | ||
|
|
||
| name = "cone_with_cfg_addons" | ||
| tags = ["object"] | ||
| usd_path = "https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.5/Isaac/Props/Shapes/cone.usd" | ||
| default_prim_path = "{ENV_REGEX_NS}/target_cone_with_cfg_addons" | ||
| object_type = ObjectType.RIGID | ||
| spawn_cfg_addon = {"visible": False} # By default, the object is visible. | ||
| asset_cfg_addon = {"debug_vis": True} # By default, the object is not debug visualized. | ||
|
|
||
| def __init__(self, prim_path: str = default_prim_path, initial_pose: Pose | None = None): | ||
| super().__init__(prim_path=prim_path, initial_pose=initial_pose) | ||
|
|
||
| cone = ConeWithCfgAddons() | ||
|
|
||
| # Check that the settings have been applied | ||
| assert cone.object_cfg.spawn.visible is False | ||
| assert cone.object_cfg.debug_vis is True | ||
|
|
||
| return True | ||
|
|
||
|
|
||
| def test_object_with_cfg_addons(): | ||
| result = run_simulation_app_function( | ||
| _test_object_with_cfg_addons, | ||
| headless=HEADLESS, | ||
| ) | ||
| assert result, "Test failed" | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| test_object_with_cfg_addons() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.