Skip to content

Commit df54acf

Browse files
committed
Add teapot asset for Newton MPM demo
1 parent aea19b6 commit df54acf

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.usd filter=lfs diff=lfs merge=lfs -text
22
*.usda filter=lfs diff=lfs merge=lfs -text
3+
*.usdc filter=lfs diff=lfs merge=lfs -text
34
*.psd filter=lfs diff=lfs merge=lfs -text
45
*.hdr filter=lfs diff=lfs merge=lfs -text
56
*.dae filter=lfs diff=lfs merge=lfs -text

scripts/demos/newton_cup_pour_mpm.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@
132132
CUP_ASSET_PATH = f"{CUP_BODY_PATH}/Asset"
133133
GROUND_PATH = "/World/Ground"
134134
VISUALS_PATH = "/World/Visuals"
135-
TEAPOT_USD_PATH = (
136-
"/home/maximiliank/Work/IsaacLab/source/isaaclab_assets/isaaclab_assets/rand/teapot_hollow_separate_lid.usdc"
137-
)
135+
TEAPOT_USD_REL_PATH = "Props/Teapot/teapot_hollow_separate_lid.usdc"
138136

139137
TABLE_TOP_Z = 0.85
140138
TABLE_HALF_EXTENTS = (0.85, 0.55, 0.03)
@@ -250,7 +248,12 @@ def cup_pose_at_time(sim_time: float) -> tuple[np.ndarray, np.ndarray, np.ndarra
250248
def get_teapot_usd_path() -> str:
251249
"""Return the local hollow teapot USD asset path."""
252250

253-
usd_path = os.path.abspath(args_cli.teapot_usd or TEAPOT_USD_PATH)
251+
if args_cli.teapot_usd is not None:
252+
usd_path = os.path.abspath(args_cli.teapot_usd)
253+
else:
254+
from isaaclab_assets import ISAACLAB_ASSETS_DATA_DIR
255+
256+
usd_path = os.path.join(ISAACLAB_ASSETS_DATA_DIR, TEAPOT_USD_REL_PATH)
254257
if not os.path.exists(usd_path):
255258
raise FileNotFoundError(
256259
f"Teapot USD not found: {usd_path}. Pass --teapot-usd with the local hollow teapot asset path."
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Added
2+
^^^^^
3+
4+
* Added a hollow teapot USD asset for the Newton MPM teapot-pour demo.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:579c73e0e3a82976d7e8f99044bf4e1f322349448b051c10241c852157af3997
3+
size 3156287

0 commit comments

Comments
 (0)