RTX Lidar issue

Hi,
I am making a simulation which involves the use of an RTX Lidar. Now I can run the script provided in rtx lidar doc to spawn a sensor along with the required post processing graph and then use the required data in my action graph. The problem arises when I close the simulation file and load it again, every time I do so, I have to remove the sensor and the replicator folder it makes and rerun the lidar script, otherwise the lidar doesn’t work.
Is there a way, so that I can run the lidar script,.save the configuration and it works even if I reload the simulation file without having to rerun the lidar script and setup sensor prim again and again?

The issue is solved. I just had to make a action graph and use Onload node along with a script node containing the RTX lidar sensor and renderer setup script.

I dropped you a pm about this so my reading about this.

Did you use the on loaded node to trigger a script node with the RTX code from

https://docs.omniverse.nvidia.com/isaacsim/latest/features/sensors_simulation/isaac_sim_sensors_rtx_based_lidar.html

I take it this is how you would run the script without using the script editor?

Pretty cool!

Yeah, I saw this technique in No Code UI doc, there they used it to trigger UI elements automatically on loading simulation. I used my own Script node with RTX lidar script along with on load node and it worked flawlessly. I guess you can use this method for any type of scripts you want executed on loading simulation.

I just tried that and it worked a treat!

My last question then would be how did you modify the graph that was created?

As I want to modify that graph the render/SDGpipeline. I take it thats the graph you are using to split your data

the way I’m doing it is running the node as you advised but not sure how you modify the graph after the fact?

Or did you write all the code in the original script?

Thanks

In my case I needed the linear_depth_data which is given by isaac rtx flat scan node. This is my modified script for creating rtx graph with this particular node

import omni.kit.commands
from pxr import Gf
from omni.isaac.core.utils.render_product import create_hydra_texture
import omni.replicator.core as rep
lidar_config = "RPLIDAR_S2E"
import math

rotation_angle = math.radians(90.0)
rotation_axis = Gf.Vec3d(0, 1, 0)
rotation = Gf.Rotation(rotation_axis, 90.0) 
# 1. Create The Camera
_, sensor = omni.kit.commands.execute(
    "IsaacSensorCreateRtxLidar",
    path="/sensor",
    parent=None,
    config=lidar_config,
    translation=(0, 0, 350.0),
    orientation=rotation.GetQuat()
)
# 2. Create and Attach a render product to the camera
_, render_product_path = create_hydra_texture([1, 1], sensor.GetPath().pathString)

# 3. Create a Replicator Writer that "writes" points into the scene for debug viewing
writer = rep.writers.get("RtxLidarDebugDrawPointCloudBuffer")
writer.attach([render_product_path])

# 4. Create Annotator to read the data from with annotator.get_data()
annotator = rep.AnnotatorRegistry.get_annotator("RtxSensorCpuIsaacCreateRTXLidarScanBuffer")
annotator = rep.AnnotatorRegistry.get_annotator("RtxSensorCpuIsaacComputeRTXLidarFlatScan")
annotator.attach([render_product_path])

You can explore below link for learning about the different annotators corresponding to different rtx lidar nodes
https://docs.omniverse.nvidia.com/isaacsim/latest/features/sensors_simulation/isaac_sim_sensors_rtx_based_lidar/node_descriptions.html

After setting up the script to spawn lidar with my required node, I accessed the data (linear_depth_data in my case) using this command in script node of another action graph where I have implemented my other logic
depth = og.Controller().node("/Render/PostProcess/SDGPipeline/RenderProduct_Isaac_RtxSensorCpuIsaacComputeRTXLidarFlatScan").get_attribute("outputs:linearDepthData").get()

1 Like

Awesome I see how your doing it

depth = og.Controller().node(“/Render/PostProcess/SDGPipeline/RenderProduct_Isaac_RtxSensorCpuIsaacComputeRTXLidarFlatScan”).get_attribute(“outputs:linearDepthData”).get()

that section is exactly what i’m looking!

I need to have a play but fantastic!

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