I am trying to use the Python API to start up Isaac Sim, load in a robot via URDF, and then create ROS topics to publish camera feeds to. To achieve the last step, I copied this code from the example:
from pxr import PhysicsSchema, Sdf import omni.usd import omni.kit import omni.isaac.RosBridgeSchema as ROSSchema stage = omni.usd.get_context().get_stage() camera_prim = ROSSchema.RosCamera.Define(stage, Sdf.Path("/ROS_Camera")) # adding prefix to the publisher topic in case multiple cameras are added camera_prim.CreateRosNodePrefixAttr("") camera_prim.CreateEnabledAttr(True) # publisher topic for camera_info camera_prim.CreateCameraInfoPubTopicAttr("/camera_info") # publisher topic for rgb camera_prim.CreateRgbPubTopicAttr("/rgb") # publisher topic for depth camera_prim.CreateDepthPubTopicAttr("/depth") camera_prim.CreateFrameIdAttr("/sim_camera") # enable RGB camera_prim.CreateRgbEnabledAttr(True) # enable depth camera_prim.CreateDepthEnabledAttr(True) camera_prim.CreateQueueSizeAttr(10) editor = omni.kit.editor.get_editor_interface() if not editor.is_playing(): editor.play()
However, this does not seem to be creating the topic. I have roscore running in a different terminal, and when I rostopic list, it does not list any of the topics that this code should be creating. Am I missing some step?
I understand that
omni.isaac.ros_bridge has an object that allows one to start up roscore from within Python. However, when roscore runs this way, it throws an error. In my final use case, I will have roscore running separately anyway, so I don’t want the Python API code to run it for me. Is it possible for this ROS bridge stuff to use a ROS core in a different process/terminal?