Hi! I am trying to write an extension to load an RTX Lidar onto the stage, which consecutively creates an actiongraph with a PostProcessing SDGpipeline. I follow the documentation here.
First, I followed the documentation and executed the code in the Script Editor, when it worked perfectly. I was able to visualize the PointCloud on the viewport. The code on the Script editor is:
whereas if I enter the same code in the extension script as follows:
sensorPath = "/sensor" self.lidar_config="Example_Rotary" _, self._sensor = omni.kit.commands.execute( "IsaacSensorCreateRtxLidar", path=sensorPath, parent=None, config=self.lidar_config, translation=(-40, 0, 10), orientation=Gf.Quatd(0.5, 0.5, -0.5, -0.5), ) # _, render_product_path = create_hydra_texture([1, 1], self._sensor.GetPath().pathString) # Code snippet copied from render_product.py stage = get_current_stage() with Usd.EditContext(stage, stage.GetSessionLayer()): resolution: Tuple[int] = [1, 1] factory = omni.hydratexture.acquire_hydra_texture_factory_interface() render_product_path = omni.usd.get_stage_next_free_path(stage, "/Render/RenderProduct_Isaac", False) name = render_product_path.split("/Render/RenderProduct_")[-1] texture = factory.create_hydra_texture(name, resolution, resolution, "", self._sensor.GetPath().pathString, "rtx") writer = rep.writers.get("RtxLidar" + "DebugDrawPointCloud") writer.attach([render_product_path])
A sensor prim is created and so is a completely identical omnigraph, but then I wasn’t able to visualize the point cloud on the viewport nor was I able to publish the pointcloud using ROS.
After a bit of digging, I found out that the the first OGN in the action graph - SdOnNewFrame receives a list of 2 renderProductDataPtrs and 2 renderProductPaths when I execute the code in script editor and one one when in extension. I have attached the screenshots below.
When in Script Editor:
When via extension: