-
Notifications
You must be signed in to change notification settings - Fork 32
Isaac Lab Interop. #413
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
Draft
alexmillane
wants to merge
15
commits into
main
Choose a base branch
from
alex/prototype/env_registration_callback
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Isaac Lab Interop. #413
Changes from 7 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
46a7551
Works but dirty.
alexmillane 1a260a1
Get hard coding of the policy out of the compiler.
alexmillane fd4eca8
Cleanup
alexmillane 4f7fe02
Move environment callback somewhere more sensible.
alexmillane 16738cc
Remove RL scripts.
alexmillane 74fc4c1
Remove bug to get working.
alexmillane 5045dc4
Load RSL-RL agent config from checkpoint params/agent.yaml
cvolkcvolk 265c345
Merge remote-tracking branch 'origin/main' into alex/prototype/env_re…
cvolkcvolk 0fedddb
Address PR review comments
cvolkcvolk 03fb17b
Update docs README to reflect host-based build workflow
cvolkcvolk 040aea8
Disable AppLauncher pinocchio patch to fix pxr import failure
cvolkcvolk e6ba7ba
Rework RL workflow docs to use IsaacLab train.py with --external_call…
cvolkcvolk 369785c
Remove stale TODO from step_1 environment setup doc
cvolkcvolk 3cefa82
Upgrade Docker base image to Isaac Sim 5.1.0
cvolkcvolk 1d56150
Remove pinocchio patch workaround now fixed by Isaac Sim 5.1.0 upgrade
cvolkcvolk 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,51 @@ | ||
| # Copyright (c) 2026, 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 | ||
|
|
||
| import argparse | ||
|
|
||
| from isaaclab_arena_environments.cli import ExampleEnvironments | ||
|
|
||
|
|
||
| def environment_registration_callback() -> list[str]: | ||
| """This function is for use with Isaac Lab scripts to register an IsaacLab Arena environment. | ||
|
|
||
| This function is passed to an Isaac Lab script as an external callback function. Example: | ||
|
|
||
| python IsaacLab/scripts/reinforcement_learning/rsl_rl/train.py | ||
| --external_callback isaaclab_arena.environments.isaaclab_interop.environment_registration_callback | ||
| --task lift_object | ||
| --num_envs 512 | ||
|
|
||
| In this case the "lift_object" environment is registered with Isaac Lab before | ||
| running the RSL RL training script. The training script will then run the | ||
| training for the lift_object environment. | ||
|
|
||
| """ | ||
| from isaaclab.app import AppLauncher | ||
|
|
||
| from isaaclab_arena.cli.isaaclab_arena_cli import add_isaac_lab_cli_args, add_isaaclab_arena_cli_args | ||
| from isaaclab_arena.environments.arena_env_builder import ArenaEnvBuilder | ||
|
|
||
| # Get the requested environment from the CLI. | ||
| parser = argparse.ArgumentParser() | ||
| # NOTE(alexmillane, 2026.02.12): With the Isaac Lab interop, we use the task name to | ||
| # determine the environment to register. The environment is also registered under this name. | ||
| # The result is that a single argument tells Arena what to register, and Lab what to run. | ||
| parser.add_argument("--task", type=str, required=True, help="Name of the IsaacLab Arena environment to register.") | ||
| environment_name = parser.parse_known_args()[0].task | ||
| environment = ExampleEnvironments[environment_name]() | ||
| # Get the full list of environment-specific CLI args. | ||
| AppLauncher.add_app_launcher_args(parser) | ||
| add_isaac_lab_cli_args(parser) | ||
| add_isaaclab_arena_cli_args(parser) | ||
| environment.add_cli_args(parser) | ||
| args, remaining_args = parser.parse_known_args() | ||
| # Create the environment config | ||
| isaaclab_arena_environment = environment.get_env(args) | ||
| # Build and register the environment | ||
| env_builder = ArenaEnvBuilder(isaaclab_arena_environment, args) | ||
| env_builder.build_registered() | ||
| # Return the arguments that were not consumed by this callback | ||
| return remaining_args |
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,45 @@ | ||
| # Copyright (c) 2026, 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 | ||
|
|
||
| rigid_object_variant_cfg = RigidObjectVariantCfg( | ||
| assets={ | ||
| "box": RigidObjectCfg( | ||
| name="box", | ||
| spawn=UsdFileCfg( | ||
| usd_path="path/to/box.usd", | ||
| ), | ||
| scale=(1.0, 1.0, 1.0), | ||
| initial_pose=Pose(position=(1.0, 2.0, 3.0), orientation=(0.0, 0.0, 0.0, 1.0)), | ||
| ), | ||
| "sphere": RigidObjectCfg( | ||
| name="sphere", | ||
| spawn=UsdFileCfg( | ||
| usd_path="path/to/sphere.usd", | ||
| ), | ||
| scale=(2.0, 2.0, 2.0), | ||
| initial_pose=Pose(position=(4.0, 5.0, 6.0), orientation=(0.0, 0.0, 0.0, 1.0)), | ||
| ), | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| cracker_box = asset_registry.get_asset_by_name("cracker_box")() | ||
| tomato_soup_can = asset_registry.get_asset_by_name("tomato_soup_can")() | ||
| object_set = RigidObjectSet(name="object_set", objects=[cracker_box, tomato_soup_can]) | ||
| object_set.set_initial_pose(Pose(position=(0.0, 0.0, 0.0), orientation=(1.0, 0.0, 0.0, 0.0))) | ||
|
|
||
|
|
||
|
|
||
|
|
||
| cracker_box = asset_registry.get_asset_by_name("cracker_box")() | ||
| tomato_soup_can = asset_registry.get_asset_by_name("tomato_soup_can")() | ||
| object_set = RigidObjectSet(name="object_set", objects=[cracker_box, tomato_soup_can]) | ||
| object_set.set_initial_pose( | ||
| PoseVariant(poses={ | ||
| cracker_box: Pose(position=(1.0, 2.0, 3.0), orientation=(0.0, 0.0, 0.0, 1.0)), | ||
| tomato_soup_can: Pose(position=(4.0, 5.0, 6.0), orientation=(0.0, 0.0, 0.0, 1.0)), | ||
| }) | ||
| ) |
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 was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.