How to change camera projectiontype to capture 360 render of the scene

Im new to onmiverse development I want to change the camera projection type and capture 360 render

import omni.kit.commands
from pxr import Sdf, UsdGeom

omni.kit.commands.execute(‘CreatePrimWithDefaultXform’,
prim_type=‘Camera’,
attributes={‘focusDistance’: 400, ‘focalLength’: 24},
select_new_prim=True)

stage = omni.usd.get_context().get_stage()
target_layer = stage.GetSessionLayer()

for prim in stage.Traverse():
if prim.IsA(UsdGeom.Camera):
print(prim.GetPath())

omni.kit.commands.execute(‘ChangeProperty’,
prop_path=Sdf.Path(‘/World/Camera.projection’),
value=‘fisheyeSpherical’,
prev=None,
target_layer=target_layer)

image

My objective is to write a script that will generate and position a camera with a fisheyeSpherical projection and take a 360-degree render at 5K quality. Am I headed in the right direction what are the steps i need to follow? Any assistance would be greatly appreciated.

i think for your second kit command, it should read…

omni.kit.commands.execute('ChangeProperty',
	prop_path=Sdf.Path('/World/Camera.cameraProjectionType'),
	value='fisheyeSpherical',
	prev=None,
	target_layer=target_layer)

otherwise, i didn’t see anything else that stood out to me. were you not able to get the result you are after?