Error while generating synthetic data

Hi, I’m trying to generate dataset using offline pose generation example with custom USD file and getting this error. I hope you can help me:

Traceback (most recent call last): File "standalone_examples/replicator/offline_pose_generation/offline_doli_pose_generation.py", line 637, in <module> test=args.test, File "standalone_examples/replicator/offline_pose_generation/offline_doli_pose_generation.py", line 153, in __init__ self._setup_world() File "standalone_examples/replicator/offline_pose_generation/offline_doli_pose_generation.py", line 348, in _setup_world self.writer_helper.save_mesh_vertices(mesh_prim, coord_prim, prim_type, self._output_folder) File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.replicator.isaac/omni/replicator/isaac/scripts/writers/ycb_video_writer.py", line 184, in save_mesh_vertices points = get_mesh_vertices_relative_to(mesh_prim, coord_prim) File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.core/omni/isaac/core/utils/mesh.py", line 34, in get_mesh_vertices_relative_to vertices_tf_row_major = np.pad(vertices, ((0, 0), (0, 1)), constant_values=1.0) File "<__array_function__ internals>", line 6, in pad File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.pip_archive/pip_prebundle/numpy/lib/arraypad.py", line 743, in pad pad_width = _as_pairs(pad_width, array.ndim, as_index=True) File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.pip_archive/pip_prebundle/numpy/lib/arraypad.py", line 518, in _as_pairs return np.broadcast_to(x, (ndim, 2)).tolist() File "<__array_function__ internals>", line 6, in broadcast_to File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.pip_archive/pip_prebundle/numpy/lib/stride_tricks.py", line 411, in broadcast_to return _broadcast_to(array, shape, subok=subok, readonly=True) File "/home/cenk/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/extscore/omni.kit.pip_archive/pip_prebundle/numpy/lib/stride_tricks.py", line 350, in _broadcast_to op_flags=['readonly'], itershape=shape, order='C') ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,2) and requested shape (0,2) 2023-05-17 14:49:53 [13,962ms] [Warning] [carb.audio.context] 1 contexts were leaked ./python.sh: line 41: 23562 Segmentation fault (core dumped) $python_exe "$@" $args There was an error running python 

Hi there,

can you share the USD file that causes the issue? Did you check if other USD files are getting the same error, or only this particularone?

Best

I didn’t check with other USD files. I just imported a STL file into Isaac Sim and export as USD file.

dolly.usdc (1.4 MB)
dolly.usd (1.4 MB)

I’ve tried these two files. dolly.usdc exported from Blender and dolly.usd exported from Isaac.

Could you share the changes you did in the script and config file? Thanks!

The only change I made in offline_pose_generation.py:

 # Add the part to train the network on part_name = "dolly" ref_path = "/home/cenk/Desktop/dolly.usdc" prim_type = f"_{part_name[1:]}" path = "/World/" + prim_type mesh_path = path + "/" + prim_type name = "train_part" 

Can you check if you get an error if you set the DynamicObject as this:

train_part = DynamicObject( usd_path="/home/user/Downloads/dolly.usd", prim_path="/World/dolly", mesh_path="/World/dolly/_oli3/_oli3", name=name, position=np.array([0.0, 0.0, 0.0]), scale=np.array(config_data["OBJECT_SCALE"]), mass=1.0, ) 

The mesh_path needs to point to the mesh asset in the script:

Sorry for the late reply. I tried your way but it still didn’t work, I tried a lot but was able to do it just by editing like the example structure and naming the file _olly.usd.
For example, when I imported the 003_cracker_box model, the file was added as _03_cracker_box to the “World”, but when I imported the dolly.usd file, the file was added as dolly, not "_olly. Because of that i renamed the file to _olly.usd

Thanks for the help.

I am glad you managed to fix the issue. Yes, the script is currently tailored to the naming specifics of the YCB dataset meshes.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.