-
Notifications
You must be signed in to change notification settings - Fork 507
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
[Development] Add convert glb to usd objects. Issac Lab repo installation required. #2113
base: isaac_sim_dev
Are you sure you want to change the base?
Conversation
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.
Some good progress here! I left some comments.
My biggest request is to add a test file (the last comment in usd_conversion_scene.py
).
Also, I see that pre-commit and python lint CI tests are failing (see below "Some checks are failing"). Try to get those passing. Have you installed pre-commit locally? See instructions.
Let me know when you've addressed my comments and I'll take another look!
habitat-lab/habitat/isaacsim/remote_content/object_glb/.gitignore
Outdated
Show resolved
Hide resolved
habitat-lab/habitat/isaacsim/remote_content/object_usd/.gitignore
Outdated
Show resolved
Hide resolved
local_download_folder = "/home/trandaniel/dev/IsaacSimConversion/usd_scene/" | ||
glb_data_folder = "/home/trandaniel/dev/habitat-sim/data/hssd-hab/objects" | ||
|
||
convert_scene_instance( |
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.
Let's add test/test_isaac_sim.py
to habitat-lab in this PR. Look at our other test files in that folder for reference. Let's have a test that tries to convert a toy habitat scene instance (this is something you suggested a while back). The test can assume the source assets are present on the machine (or maybe check for them and skip the test if they're missing). The test should inspect the output usda
file and check for expected contents.
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.
Migrating unit tests and example data from PR #2123
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.
Need to delete PR #2123 after unit tests are reviewed.
…itten by Eric Undersander.
…associated commands.
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.
I left some comments. A few top-level comments:
- Let's add nice CLIs for both of these files. This means using argument-parsing and offering a friendly command-line interface.
- You need to fill out the PR description. What's autopopulated there is a template for you to edit. This is an important part of documenting a code change.
- As I requested earlier, let's add a minimal test file to this PR.
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.
Good progress here!
Please flesh out your PR description a bit. You don't have to explain what Isaac Sim is, but give some background for why we need these conversion utils. Mention that we convert scene instances including rigid objects (but not any included articulated objects or the stage yet). Mention the URDF conversion for converting robot URDF files. For Type of change, specify [Development].
Let's move meshColored
inside data/usd_conversion_data
so all the isaac-related test data is in one subfolder.
It looks like maybe you're not using test/data/usd_conversion_data/102343992.scene_instance.json
for testing, so you can remove it from this PR.
I suspect you don't need to add test/data/usd_conversion_data/objects_EXAMPLE2/1efdc3d37dfab1eb9f99117bb84c59003d684811.glb
to this repo, because it's a render GLB and it won't be used/loaded during the conversion (or am I missing something?). In general, we want to be really careful and selective about adding binary files to a git repo, since they are usually large.
out_usd_filepath = urdf_dir + "hab_spot_arm_with_hab_metadata.usda" | ||
project_root_folder = repo_dir | ||
|
||
subprocess.run( |
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.
Your test shouldn't run the script in a subprocess. Just import and run the required functionality directly.
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.
I can't run the conversion files as imports because assuming you run a unit test file, the other conversion files cannot use the Issac Lab USD library imported inside the unit test file. Instead, you have to run another instance of Applauncher on the conversion file.
An alternative to subprocess would be running the below, but at this point I don't know how to run the conversion file from Applauncher environment within the unit test file.
command = f"python script.py {arg1} {arg2}"
os.system(command)
out_usd_path: str, | ||
project_root_folder: str, | ||
) -> None: | ||
"""This converts an hssd object to a usda file. |
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.
Just bumping this comment. Let's not name HSSD in comments.
Motivation and Context
This pull request (PR) introduces the capability to convert file types in Isaac Lab, specifically converting files into .usda format. These conversion utilities are essential for Isaac Sim physics simulations to process scene instance JSONs and object meshes from Habitat-Sim.
The PR includes the conversion of scene instances, encompassing rigid body objects. However, it does not currently support articulated objects or the stage. Future updates will address these limitations.
Additionally, a separate set of functions is required to convert robot URDF files into .usda format for use in Isaac Sim. This functionality will be implemented in a subsequent update.
How Has This Been Tested
Unit tests will be added to code function and the usda file output.
Types of changes
Checklist