-
Notifications
You must be signed in to change notification settings - Fork 3k
Removes usage of IsaacSim SimulationContext inside tests
#4046
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
Mayankm96
merged 19 commits into
isaac-sim:main
from
pascal-roth:fix/stage-utils-decorators
Jan 28, 2026
+51
−97
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
aff03ee
fixes
pascal-roth 13b7d9d
add fixme
pascal-roth b777d41
remove simulationcontext of IsaacSim
pascal-roth e71ad7d
changes from review
pascal-roth 4cac2dc
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth a337513
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth f2ccd82
Merge branch 'fix/stage-utils-decorators' of github.com:pascal-roth/I…
pascal-roth dd7e75a
formatter and usd import fix
pascal-roth 90e30c6
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth 194fc0b
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth 016441a
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth 9f961d1
Merge branch 'main' into fix/stage-utils-decorators
Mayankm96 fce657c
Merge branch 'main' into fix/stage-utils-decorators
Mayankm96 c9996f9
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth 07d2a75
prevent timeout error
pascal-roth a89d372
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth dcbd1da
Merge branch 'main' into fix/stage-utils-decorators
pascal-roth e7f6df2
uses sim context set came view
Mayankm96 1a05101
Merge branch 'main' into fix/stage-utils-decorators
Mayankm96 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
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 | ||
|---|---|---|---|---|
|
|
@@ -36,13 +36,13 @@ | |||
|
|
||||
| import torch | ||||
|
|
||||
| from isaacsim.core.api.simulation_context import SimulationContext | ||||
| from isaacsim.core.cloner import GridCloner | ||||
| from isaacsim.core.utils.viewports import set_camera_view | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
|
|
||||
| import isaaclab.sim as sim_utils | ||||
| from isaaclab.assets import Articulation | ||||
| from isaaclab.sensors.contact_sensor import ContactSensor, ContactSensorCfg | ||||
| from isaaclab.sim import SimulationCfg, SimulationContext | ||||
| from isaaclab.utils.timer import Timer | ||||
|
|
||||
| ## | ||||
|
|
@@ -75,9 +75,9 @@ def main(): | |||
| """Spawns the ANYmal robot and clones it using Isaac Sim Cloner API.""" | ||||
|
|
||||
| # Load kit helper | ||||
| sim = SimulationContext(physics_dt=0.005, rendering_dt=0.005, backend="torch", device="cuda:0") | ||||
| sim = SimulationContext(SimulationCfg(dt=0.005)) | ||||
| # Set main camera | ||||
| set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0]) | ||||
| sim.set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0]) | ||||
|
|
||||
| # Enable hydra scene-graph instancing | ||||
| # this is needed to visualize the scene when flatcache is enabled | ||||
|
|
||||
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 | ||
|---|---|---|---|---|
|
|
@@ -41,14 +41,14 @@ | |||
|
|
||||
| import torch | ||||
|
|
||||
| from isaacsim.core.api.simulation_context import SimulationContext | ||||
| from isaacsim.core.cloner import GridCloner | ||||
| from isaacsim.core.prims import RigidPrim | ||||
| from isaacsim.core.utils.viewports import set_camera_view | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
|
|
||||
| import isaaclab.sim as sim_utils | ||||
| import isaaclab.terrains as terrain_gen | ||||
| from isaaclab.sensors.ray_caster import RayCaster, RayCasterCfg, patterns | ||||
| from isaaclab.sim import SimulationCfg, SimulationContext | ||||
| from isaaclab.terrains.config.rough import ROUGH_TERRAINS_CFG | ||||
| from isaaclab.terrains.terrain_importer import TerrainImporter | ||||
| from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR | ||||
|
|
@@ -88,19 +88,9 @@ def design_scene(sim: SimulationContext, num_envs: int = 2048): | |||
| def main(): | ||||
| """Main function.""" | ||||
|
|
||||
| # Load kit helper | ||||
| sim_params = { | ||||
| "use_gpu": True, | ||||
| "use_gpu_pipeline": True, | ||||
| "use_flatcache": True, # deprecated from Isaac Sim 2023.1 onwards | ||||
| "use_fabric": True, # used from Isaac Sim 2023.1 onwards | ||||
| "enable_scene_query_support": True, | ||||
| } | ||||
| sim = SimulationContext( | ||||
| physics_dt=1.0 / 60.0, rendering_dt=1.0 / 60.0, sim_params=sim_params, backend="torch", device="cuda:0" | ||||
| ) | ||||
| # Set main camera | ||||
| set_camera_view([0.0, 30.0, 25.0], [0.0, 0.0, -2.5]) | ||||
| sim = SimulationContext(SimulationCfg()) | ||||
| # Set main camera | ||||
| sim.set_camera_view([0.0, 30.0, 25.0], [0.0, 0.0, -2.5]) | ||||
|
|
||||
| # Parameters | ||||
| num_envs = args_cli.num_envs | ||||
|
|
||||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an isaac sim test...