Isaac Sim Version
4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):
Operating System
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):
GPU Information
- Model: A4500
How to add an Isaacsim asset through Python script API
Detailed Description
Adding mesh prims is well documented but I couldn’t find an example of how to add an Isaacsim asset (E.g., factory gear) through the Python script API with its visualization and collision meshes.
The following piece of code doesn’t work (usd file was copied to this path):
factory_large_gear_usd_asset_path = "standalone_examples/factory_gear_large.usd"
factory_large_gear_prim_path = "/World/factory_gear_large"
itemPrim = stage.DefinePrim(factory_large_gear_prim_path, "Xform")
itemPrim.GetReferences().AddReference(
assetPath = factory_large_gear_usd_asset_path,
primPath = factory_large_gear_prim_path)
xformable = UsdGeom.Xformable(itemPrim)
# Move cube (translate)
xformable.AddTranslateOp().Set(value=(10, 0, 12))
# Rotate
xformable.AddRotateXYZOp().Set(Gf.Vec3d(0, 1, 0))
# Scale
xformable.AddScaleOp().Set((5, 10, 5))
Screenshots or Videos
Using the GUI it is straightforward: