Add_pointcloud_to_frame() API not working for omni.issac.sensor.camera (Isaac-sim 2022.2.0)

This seems to be a Isaac 2022.2.0 bug as mentioned in Slack. This issue has been fixed internally and will be included in the next Isaac release.

For now, the temporary fix is to add an arbitrary object with semantic labels:

import omni.replicator.core as rep
cone = rep.create.cone(semantics=[("class", "cone")])

Based on your code, the modified code should look like:

import omni.replicator.core as rep
cone = rep.create.cone(semantics=[("class", "cone")])

camera = Camera(
    prim_path="/World/camera",
    position=np.array([0.0, 0.0, 25.0]),
    frequency=20,
    resolution=(256, 256),
    orientation=rot_utils.euler_angles_to_quats(np.array([0, 90, 0]), degrees=True),
)

my_world.scene.add_default_ground_plane()
my_world.reset()
camera.initialize()

i = 0
camera.add_motion_vectors_to_frame()
camera.add_pointcloud_to_frame()

while simulation_app.is_running():
    my_world.step(render=True)
    print(camera.get_current_frame())