From f63803c2dc64f2745efdc59d2d46c759f92a9755 Mon Sep 17 00:00:00 2001 From: Kelly Guo Date: Thu, 3 Oct 2024 17:09:33 -0400 Subject: [PATCH] Fixes scaling of default ground plane --- .../omni/isaac/lab/sim/spawners/from_files/from_files.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py index 5e3c88dc1d..cab6bf06c9 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/from_files/from_files.py @@ -151,16 +151,11 @@ def spawn_ground_plane( # Scale only the mesh # Warning: This is specific to the default grid plane asset. - if prim_utils.is_prim_path_valid(f"{prim_path}/Enviroment"): + if prim_utils.is_prim_path_valid(f"{prim_path}/Environment"): # compute scale from size scale = (cfg.size[0] / 100.0, cfg.size[1] / 100.0, 1.0) # apply scale to the mesh - omni.kit.commands.execute( - "ChangeProperty", - prop_path=Sdf.Path(f"{prim_path}/Enviroment.xformOp:scale"), - value=scale, - prev=None, - ) + prim_utils.set_prim_property(f"{prim_path}/Environment", "xformOp:scale", scale) # Change the color of the plane # Warning: This is specific to the default grid plane asset.