Hi. I want to fix the publish rate of my pointcloud2 topics.
Currently, my omnigraph publishes the topic with 60 Hz, which is identical to rendering_dt.
A simple way must be reducing render_dt, but I’m not sure this is the most elegant way.
and I found some docs about OnImpulseEvent, I wondered if this is the only available method to adjust hz in the omnigraph?
Thanks!
def set_pcd_graph(self):
og.Controller.edit(
{"graph_path": "/Depth_pcl", "evaluator_name": "execution"},
{
og.Controller.Keys.CREATE_NODES: [
("OnPlaybackTick", "omni.graph.action.OnPlaybackTick"),
("IsaacCreateViewport", "omni.isaac.core_nodes.IsaacCreateViewport"),
("IsaacGetViewportRenderProduct", "omni.isaac.core_nodes.IsaacGetViewportRenderProduct"),
("IsaacSetCamera", "omni.isaac.core_nodes.IsaacSetCameraOnRenderProduct"),
("ROS1CameraHelper", "omni.isaac.ros_bridge.ROS1CameraHelper"),
("ROS1PublishTransformTree", "omni.isaac.ros_bridge.ROS1PublishTransformTree"),
("ROS1ReadSimulationTime", "omni.isaac.core_nodes.IsaacReadSimulationTime"),
("ROS1PublishJointState", "omni.isaac.ros_bridge.ROS1PublishJointState"),
("PublishClock", "omni.isaac.ros_bridge.ROS1PublishClock"),
("ReadSimTime", "omni.isaac.core_nodes.IsaacReadSimulationTime"),
],
og.Controller.Keys.CONNECT: [
("OnPlaybackTick.outputs:tick", "IsaacCreateViewport.inputs:execIn"),
("IsaacCreateViewport.outputs:execOut", "IsaacGetViewportRenderProduct.inputs:execIn"),
("IsaacCreateViewport.outputs:viewport", "IsaacGetViewportRenderProduct.inputs:viewport"),
("IsaacGetViewportRenderProduct.outputs:execOut", "IsaacSetCamera.inputs:execIn"),
("IsaacGetViewportRenderProduct.outputs:renderProductPath", "IsaacSetCamera.inputs:renderProductPath"),
("IsaacSetCamera.outputs:execOut", "ROS1CameraHelper.inputs:execIn"),
("IsaacGetViewportRenderProduct.outputs:renderProductPath", "ROS1CameraHelper.inputs:renderProductPath"),
("OnPlaybackTick.outputs:tick", "ROS1PublishTransformTree.inputs:execIn"),
("ROS1ReadSimulationTime.outputs:simulationTime", "ROS1PublishTransformTree.inputs:timeStamp"),
("OnPlaybackTick.outputs:tick", "ROS1PublishJointState.inputs:execIn"),
("ROS1ReadSimulationTime.outputs:simulationTime", "ROS1PublishJointState.inputs:timeStamp"),
("ReadSimTime.outputs:simulationTime", "PublishClock.inputs:timeStamp"),
("OnPlaybackTick.outputs:tick", "PublishClock.inputs:execIn"),
],
og.Controller.Keys.SET_VALUES: [
("IsaacCreateViewport.inputs:name", "New Viewport"),
("ROS1CameraHelper.inputs:enableSemanticLabels", False),
("ROS1CameraHelper.inputs:frameId", "Camera"),
("ROS1CameraHelper.inputs:type", "depth_pcl"),
("ROS1CameraHelper.inputs:topicName", "Isaac/Depth_pcl"),
("PublishClock.inputs:topicName", "/clock"),
],
},
)
set_target_prims(primPath="/Depth_pcl/IsaacSetCamera", inputName="inputs:cameraPrim", targetPrimPaths=["/World/Camera"])
set_target_prims(primPath="/Depth_pcl/ROS1PublishTransformTree", inputName="inputs:targetPrims",
targetPrimPaths=["/World/Camera", "/World/Robot", "/World/Table", "/World/Object"])
set_target_prims(primPath="/Depth_pcl/ROS1PublishJointState", inputName="inputs:targetPrim", targetPrimPaths=["/World/Robot"])