Hi,
I’ve been battling with this whole morning.
Can someone explain why this code does not work as intended?
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.