ERROR in python script sample for "4.3. Introduction to Cloner" tutorial (Isaac Gym Tutorial)

For the “4. Getting Started with Cloner (Isaac Gym Tutorials) - 4.3. Introduction to Cloner” section of the tutorial, the provided sample python code throws the following error.

link: 4. Getting Started with Cloner — Omniverse Robotics documentation

In “4.3. Introduction to Cloner” section of the tutorial, the instruction says:

“Please make sure omni.isaac.cloner is enabled from the Extensions window before running the snippets.
Let’s first start with a simple use case of the Cloner interface. In this example, we will create a scene with 4 cubes.”

from omni.isaac.cloner import Cloner    # import Cloner interface
from omni.isaac.core.utils.stage import get_current_stage
from pxr import UsdGeom

# create our base environment with one cube
base_env_path = "/World/Cube_0"
UsdGeom.Cube.Define(get_current_stage(), base_env_path)

# create a Cloner instance
cloner = Cloner()

# generate 4 paths that begin with "/World/Cube" - path will be appended with _{index}
target_paths = cloner.generate_paths("/World/Cube", 4)

# clone the cube at target paths
cloner.clone(source_prim_path="/World/Cube_0", prim_paths=target_paths)

“We can add a transform to each cube, simply replace the last line of the previous code with the following:”

import numpy as np

cube_positions = np.array([[0, 0, 0], [3, 0, 0], [6, 0, 0], [9, 0, 0]])

# clone the cube at target paths at specified positions
cloner.clone(source_prim_path="/World/Cube_0", prim_paths=target_paths, positions=cube_positions)

so when I replace the last line of the first block of code with the second code block and run the scipt on the Script Editor extension it throws the following error and only 1 cube is generated when there should be 4 cubes.

There is an error in the python script provided and it needs to be fixed.

Hi there, thanks for reporting the error. This issue should be fixed in the latest isaac sim release.