I am trying to create distractors by selecting a bunch of objects in the scene and export them as distractor props and I am doing this in Isaac Sim. However, I am getting error. Is this a good way to create props and and if so, how should I fix this error?
Can you provide more details about the distractors and how you are planning to create them? Also at which step are you getting the error?
I am interested in grouping these, name them PROPS and randomize their location. They will be considered as “not objects of interest”.
You can then read out their paths in nucleus and use something like this:
from omni.isaac.core.utils.nucleus import get_assets_root_path
import omni.replicator.core as rep
WAREHOUSE_ASSETS = [
"/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Props/Dolly/dolly.usd",
"/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Props/KLT_Bin/small_KLT.usd",
"/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Props/Pallet/pallet.usd",
]
assets_root_path = get_assets_root_path()
if assets_root_path is None:
raise Exception("Nucleus server not found, could not access Isaac Sim assets folder")
print(f"assets_root_path={assets_root_path}")
object_paths = [assets_root_path + path for path in WAREHOUSE_ASSETS]
object_nodes = [rep.create.from_usd(path) for path in object_paths]
objects = rep.create.group(object_nodes)
with rep.trigger.on_frame(num_frames=NUM_FRAMES):
with objects:
rep.modify.pose(
position=rep.distribution.uniform((-8, 9, 0), (2, 14, 7)),
rotation=rep.distribution.uniform((0, 0, 0), (360, 360, 360)),
scale=rep.distribution.uniform(0.5, 2),
)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.