Action Graph not loading properly when a stage is loaded from standalone script in Isaac Sim

I am trying to run a standalone python script that aims to open and load a USD stage and starts it running. The USD file that the script intends to open has been already worked upon and contains robot prims and some action graphs. The action graphs use Isaac ROS bridge and Semu Robotics bridge by @toni.sm to publish various information on ros topics and respective transforms. Now, whenever the USD stage is loaded from GUI, i.e., opening Isaac Sim from launcher and opening the USD file, everything runs fine. The transforms are published and I am able to control the robot via MoveIt. However, whenever I try to open and load the USD file from standalone script the MoveIt fails to connect as “Comput Graph” attribute from the Action Graph of all nodes are missing.

The script used:

from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})

from omni.isaac.core import World
from omni.isaac.core.utils.stage import open_stage
import os
import omni

ext_manager = omni.kit.app.get_app().get_extension_manager()
ext_manager.set_extension_enabled_immediate("omni.isaac.ros_bridge", True)
ext_manager.set_extension_enabled_immediate("semu.robotics.ros_bridge", True)


open_stage(usd_path="/path/to/usd/file.usd")
self.stage = omni.usd.get_context().get_stage()

world = World()
# world.reset()
while True:
    world.step(render=True)

simulation_app.update()

I am also sharing the screenshots of a sample action graph node, where compute graph is missing when running from Standalone script.

Below are the system specifications:

Isaac Sim 2022.2.0 and Isaac Sim 2022.2.1 (tested on both)
Ubuntu - 20.04
CPU - Intel Core i7
Cores - 24
RAM - 32 GB
GeForce RTX 3060-Ti
VRAM - 16GB
Disk - 2TB SSD

Hi @deveshkumar21398

Can you please share the logs?

Yeah sure @toni.sm. Please find the log attached.

kit_20230515_185952.log (1.4 MB)

Hi @deveshkumar21398

For some reason that I need to take time to inspect, when running from a Python standalone script the extension is not being loaded.
However, including the path to the extension, before loading it, as follow works:

ext_manager.add_path("/home/toni/Documents/OMNI/semu.robotics.ros_bridge/exts", omni.ext.ExtensionPathType.COLLECTION_USER)

I have tested it with the following code and the semu.robotics.ros_bridge extension is loaded successfully this time.

from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})

import omni
from omni.isaac.core import World
from omni.isaac.core.utils.stage import open_stage, is_stage_loading

ext_manager = omni.kit.app.get_app().get_extension_manager()
ext_manager.set_extension_enabled_immediate("omni.isaac.ros_bridge", True)

ext_manager.add_path("/home/toni/Documents/OMNI/semu.robotics.ros_bridge/exts", omni.ext.ExtensionPathType.COLLECTION_USER)
ext_manager.set_extension_enabled_immediate("semu.robotics.ros_bridge", True)
simulation_app.update()

# load stage
open_stage(usd_path="omniverse://localhost/Tests/test.usd")

# wait two frames so that stage starts loading
simulation_app.update()
simulation_app.update()

print("Loading stage...")
while is_stage_loading():
    simulation_app.update()

world = World()

world.reset()
while simulation_app.is_running():
    world.step(render=True)

simulation_app.close()

Hi @toni.sm thank you for your response. In my case, the semu.robotics.ros_bridge is already in isaac_sim-2022.2.1/exts folder. However, still I tried the above script by placing the extension in Kit path and including the path to the extension. However, still the issue remains same. I guess when I see the console it seems node starts (“SemuRosBridge node started” statement in below console) but problem seems to be somewhere else. See:

[Info][semu.robotics.ros_bridge] ROS1 Attribute: asyncio: False
[Info][semu.robotics.ros_bridge] ROS1 Attribute: event timeout: 5.0
2023-05-18 06:06:01 [15,809ms] [Warning] [omni.hydra.scene_delegate.plugin] Calling getBypassRenderSkelMeshProcessing for prim /World/PaintTool/Grass_Short_A_26bdf/pointInstancer.proto0_Grass_short_a_id0 that has not been populated
[Info][semu.robotics.ros_bridge] SemuRosBridge node started
[Info][semu.robotics.ros_bridge] ROS1 FollowJointTrajectory: destroying action server
[Info][semu.robotics.ros_bridge] ROS1 FollowJointTrajectory: register action /robot_controller/follow_joint_trajectory
[Info][semu.robotics.ros_bridge] ROS1 Attribute: register srv: /get_prims
[Info][semu.robotics.ros_bridge] ROS1 Attribute: register srv: /get_attributes
[Info][semu.robotics.ros_bridge] ROS1 Attribute: register srv: /get_attribute
[Info][semu.robotics.ros_bridge] ROS1 Attribute: register srv: /set_attribute
2023-05-18 06:06:23 [37,580ms] [Error] [omni.graph.core.plugin] /World/mobile_manipulator/ROS_Cameras/isaac_get_viewport_render_product_01: Assertion raised in compute - 'OgnIsaacGetViewportRenderProductInternalState' object has no attribute 'viewport'
  File "/home/labuser/.local/share/ov/pkg/isaac_sim-2022.2.0/exts/omni.isaac.core_nodes/omni/isaac/core_nodes/ogn/nodes/OgnIsaacGetViewportRenderProduct.py", line 39, in compute
    if db.internal_state.viewport == None:

2023-05-18 06:06:23 [37,709ms] [Error] [omni.isaac.core_nodes.impl.extension] Could not process writer attach request (True, <omni.replicator.core.scripts.writers.NodeWriter object at 0x7fb62c043c90>, '/Render/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0'), Tried to create a node in a path without a graph - '/Render/PostProcess/SDGPipeline/RenderProduct_omni_kit_widget_viewport_ViewportTexture_0_NodeWriterWriter_01'
2023-05-18 06:06:23 [37,777ms] [Warning] [omni.graph.core.plugin] Node compute request is ignored because "/World/Conveyor/ConveyorBeltGraph/ConveyorNode" is not request-driven
2023-05-18 06:06:26 [39,858ms] [Warning] [omni.graph.core.plugin] Node compute request is ignored because "/World/Conveyor/ConveyorBeltGraph/ConveyorNode" is not request-driven

Hi @deveshkumar21398

The error you are getting now is related to the IsaacGetViewportRenderProduct OmniGraph node.

Is your ActionGraph configured correctly?
Can you provide a minimal reproducible example?

Hi @toni.sm now I tried to run not a custom USD file instead a sample stage from IsaacSim, i.e., carter_warehouse_navigation.usd in Samples, whose path is - omniverse://localhost/NVIDIA/Assets/Isaac/2022.2.0/Isaac/Samples/ROS/Scenario/ or omniverse://localhost/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Samples/ROS/Scenario/

Even such an example is not properly running with “Compute Graph” missing. Besides the same works fine if we run the example from GUI. It fails to load the attribute “Compute Graph” from standalone script. PFB the screenshots of comparispon.

No “Compute Graph” screenshots running from standalone script:

With “Compute Graph” screenshots running from GUI:

Also, the code is exactly similar to the one you posted above except the open stage command, which is changed to:

open_stage(usd_path="omniverse://localhost/NVIDIA/Assets/Isaac/2022.2.0/Isaac/Samples/ROS/Scenario/carter_warehouse_navigation.usd")
open_stage(usd_path="omniverse://localhost/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Samples/ROS/Scenario/carter_warehouse_navigation.usd")

I believe the issue is somewhere else, because all such USDs are missing “Compute Graph” attribute. Could you please help me with this.

Hi @deveshkumar21398

I cannot reproduce your issue.
For example, the following code runs perfectly on Isaac Sim 2022.2.1.

from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})

import omni
from omni.isaac.core import World
from omni.isaac.core.utils.stage import open_stage, is_stage_loading

ext_manager = omni.kit.app.get_app().get_extension_manager()
ext_manager.set_extension_enabled_immediate("omni.isaac.ros_bridge", True)

simulation_app.update()

# load stage
open_stage(usd_path="omniverse://localhost/NVIDIA/Assets/Isaac/2022.2.1/Isaac/Samples/ROS/Scenario/carter_warehouse_navigation.usd")

# wait two frames so that stage starts loading
simulation_app.update()
simulation_app.update()

print("Loading stage...")
while is_stage_loading():
    simulation_app.update()

world = World()

world.reset()
while simulation_app.is_running():
    world.step(render=True)

simulation_app.close()

Can you please upload the logs of this last example?

Sure @toni.sm. Thank you for your response.

Here is the log for the example in IsaacSim 2022.2.0:

kit_20230527_184102.log (4.5 MB)

Here is the log for the example in IsaacSim 2022.2.1:

kit_20230527_184520.log (4.6 MB)