# RTX Lidar creation doubt

**URL:** <https://forums.developer.nvidia.com/t/rtx-lidar-creation-doubt/253528>\
**Category:** Isaac Sim\
**Created:** [May 17, 2023, 8:46am UTC](https://forums.developer.nvidia.com/t/rtx-lidar-creation-doubt/253528 "2023-05-17T08:46:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliabntt94](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@eliabntt94](https://forums.developer.nvidia.com/u/eliabntt94)\
**Post date:** [May 17, 2023, 8:46am UTC](https://forums.developer.nvidia.com/t/rtx-lidar-creation-doubt/253528/1 "2023-05-17T08:46:23Z")

</div>

Hi,  
I’ve been battling with this whole morning.

Can someone explain why this code does not work as intended?

```auto
	success, sensor = omni.kit.commands.execute(
		"IsaacSensorCreateRtxLidar",
		path="/RTX_Lidar",
		parent=path,
		config="Example_Rotary",
		translation=(translation[0], translation[1], translation[2]),
		orientation=Gf.Quatd(orientation[3], orientation[0], orientation[1], orientation[2]), # Gf.Quatd is w,i,j,k
	)
	omni.kit.app.get_app().update()
	omni.kit.app.get_app().update()
	omni.kit.app.get_app().update()

	_, render_product_path = create_hydra_texture([1, 1], sensor.GetPath().pathString)

	(lidar_graph, _, _, _) = og.Controller.edit(
			{"graph_path": f"{path}/LidarGraph", "evaluator_name": "execution"},
			{
				og.Controller.Keys.CREATE_NODES: [
					("ReadSimTime", "omni.isaac.core_nodes.IsaacReadSimulationTime"),
					("OnImpulseEvent", "omni.graph.action.OnImpulseEvent"),
					("PCLPublish", "omni.isaac.ros_bridge.ROS1RtxLidarHelper"),
				],
				og.Controller.Keys.CONNECT: [
					("OnImpulseEvent.outputs:execOut", "PCLPublish.inputs:execIn"),
				],
				og.Controller.Keys.SET_VALUES: [
					("PCLPublish.inputs:renderProductPath", render_product_path),
					("PCLPublish.inputs:topicName", f"{path}/lidar/point_cloud"),
					("PCLPublish.inputs:type", "point_cloud"),
					("PCLPublish.inputs:resetSimulationTimeOnStop", True),
					("PCLPublish.inputs:frameId", path),

					
				],
			},
		)

   	og.Controller.evaluate_sync(lidar_graph)
simulation_context.play()
og.Controller.set(og.Controller.attribute(f"{path}/LidarGraph/OnImpulseEvent.state:enableImpulse"), True)

```

I’m trying to create a lidar and work it out with impulses.

I’ve also tried with the tick-based creation and that did not work either.

The only way it worked was by using the core replicator writer code as in the example.

---

<div class="post-metadata">

**Author:** ![mcarlson1](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mcarlson1](https://forums.developer.nvidia.com/u/mcarlson1)\
**Post date:** [May 19, 2023, 9:36pm UTC](https://forums.developer.nvidia.com/t/rtx-lidar-creation-doubt/253528/3 "2023-05-19T21:36:04Z")

</div>

This code does not run for me, but maybe you can post one that does? It this called with python.sh I assume? I probably just need the first part of your example as well.

So I believe there is a bug with the ROS1RtxLidarHelper that leaves out a connection that is needed. If you look at the action graph, you could probably see it, I think it’s an exec to execIn connection.

Try looking at the action graph in `./python.sh standalone_examples/api/omni.isaac.ros_bridge/rtx_lidar.py`

That one have connections that are correct I think.

I would have to see your network to know how to help more, if you can give me a complete code snippet that can reproduce your error that will help!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [October 30, 2023, 10:04pm UTC](https://forums.developer.nvidia.com/t/rtx-lidar-creation-doubt/253528/4 "2023-10-30T22:04:01Z")

</div>

Closed on October 30, 2023, 10:04pm UTC

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