Adds custom asset handling to external template generation #2315
+226
−42
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.
Description
The external template generator didn’t originally account for adding personal assets, but it just felt right to include this — it’s cleaner and more intuitive for users to keep everything in one place when needed.
This PR adds that option. During project generation, the script now asks whether the user plans to use a custom asset. If so, it sets up the necessary directory structure under
data/
, copies in relevant example files (like the Cartpole USD and its config), and modifies the asset configuration files accordingly. Since the Cartpole environment is already used throughout the generator as a reference, I kept building on that as the base when a custom setup is requested.I also removed the
.usd
restriction from the.gitignore
in external projects, since it doesn’t make sense to forbid tracked USDs when the user explicitly wants to include them.One thing I’m not totally happy with is that to download the assets, I hardcoded this URL:
ISAACLAB_NUCLEUS_DIR = "http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.5/Isaac/IsaacLab"
I didn’t want to do
import ISAACLAB_NUCLEUS_DIR from isaaclab.utils.assets
just to avoid spinning up the app during generation. If there’s a better way to handle this, I’m open to suggestions!Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there