Creating ROS Camera

Hello,

Say, I have a Camera Primitive with path /environments/env_0_0/Camera_left. If I add a ROS Camera object at that path, and then select camera_prim_rel to have that camera - everything is OK - I can read /camera_info from rostopic echo after I press Play. I then add a ROS camera as such:

result, occluded_provider = omni.kit.commands.execute(
                  "ROSBridgeCreateCamera",
                  path=CAM_PATHNAME,
                  camera_prim_rel=[cam_prim.GetPath()],
                  resolution=Gf.Vec2i(1280, 720),
                  frame_id="camera_left",
                  camera_info_topic="/camera_info"+suffix,
                  rgb_enabled=True,
                  rgb_topic="/rgb"+suffix,
                  depth_enabled=True,
                  depth_topic="/depth"+suffix,
                  segmentation_enabled=True,
                  semantic_topic="/semantic"+suffix,
                  instance_topic="/instance"+suffix,
                  label_topic="/label",
                  bbox2d_enabled=False,
                  bbox2d_topic="/bbox_2d",
                  bbox3d_enabled=False,
                  bbox3d_topic="/bbox_3d",
                  queue_size=10,
              )

All the attributes are the same - the ROS camera object does get created, all attributes in the SIM look the same. But no topics can be read.

I figured, maybe there’s something to do with instance-ability - doesn’t affect anything.

Snippets:


The enabled/disabled boxes did not have any effect either.

I just noticed that the right camera - created in the same way with the same function, works. Whichever of the two cameras is created second - works normally, the first one doesn’t. If a camera is added manually - both the second coded camera and the manual camera work at the same time. I am confused. Is ISAAC able to publish one camera at a time?

Can you help?

Related issue: Multiple ROS cameras with Python API - Only one publishing

Sometimes Stop-Play fixes the issue, but not always from my experiments.

After creating the second camera, does a second viewport also get created?
Isaac sim can publish multiple camera’s but there must be a viewport for each one, and usually this automatically happens when play is pressed

Yes, each time there’s a new viewport that gets created - but sometimes it only one new viewport when play is pressed. Should I manually make viewports for these two cameras just to make sure it always works?