Hi all,
I have a .usd scene with RosCamera and RosPoseTree objects in it that should publish data to several rostopics. When I run the simulation from the GUI of Isaac Sim, the topics are published correctly, but if I load the scene with the following script, the topics are not generated/published to. What is missing? I thought starting the simulation with .play would suffice, but it seems it takes more than that, and I found no information on what I left out.
import os
from omni.isaac.python_app import OmniKitHelper
import carb
import omni
# Modified sample to load a usd stage and start simulation
CONFIG = {
"experience": f'{os.environ["EXP_PATH"]}/omni.isaac.sim.python.kit',
"width": 1280,
"height": 720,
"sync_loads": True,
"headless": True,
"renderer": "RayTracedLighting",
}
USD_PATH = "somepath/test.usd"
if __name__ == "__main__":
kit = OmniKitHelper(config=CONFIG)
# Open stage
omni.usd.get_context().open_stage(USD_PATH, None)
# Wait two frames so that stage starts loading
kit.app.update()
kit.app.update()
print("Loading stage...")
while kit.is_loading():
kit.update(1.0 / 60.0)
print("Loading Complete")
kit.play()
while kit.app.is_running():
# Run in realtime mode, we don't specify the step size
kit.update()
kit.stop()
kit.shutdown()