Dual use of ~/semantic_labels-topic in example graph

I’m using the IsaacUtils->CommonOmnigraphs->ROS2 camera graph and selected all publishers. This gives me these topics:

/cam_1/bbox_2d_loose
/cam_1/bbox_2d_tight
/cam_1/bbox_3d
/cam_1/camera_info
/cam_1/depth
/cam_1/depth/nitros_bridge
/cam_1/depth_pcl
/cam_1/instance_segmentation
/cam_1/instance_segmentation/nitros_bridge
/cam_1/rgb
/cam_1/rgb/nitros_bridge
/cam_1/semantic_labels
/cam_1/semantic_segmentation
/cam_1/semantic_segmentation/nitros_bridge

What I did not see was the instance-segmentation values. However, this is the content of /cam_1/semantic_labels:

data: ‘{“0”:“BACKGROUND”,“1”:“UNLABELLED”,“1000”:“/Warehouse/SM_SignCVer_3949/SM_SignCVer_13”,“1001”:"/Warehouse/SM_SignCVer_3950/SM_Si…’

data: ‘{“0”:{“class”:“floor”},“1”:{“class”:“wall”},“10”:{“class”:“paper_note”},“11”:{“class”:“fire_extinguisher”},“12”:{“class”:“box”},…’

It looks like both segmentations publish their ids on the same topic. When looking at the default values, both Nodes use the same value (‘semantic_labels’) for their ‘semanticValuesTopicName’-parameter.

So the first option to solve this would be to change the default value for the instance-segmentation node, but changing the topic layout would also be an option. The labels-topic could be a child of the image topic, so

/cam_1/semantic_segmentation → std_msgs/Image
/cam_1/semantic_segmentation/labels → std_msgs/String

and

/cam_1/instance_segmentation → std_msgs/Image
/cam_1/instance_segmentation/labels → std_msgs/String

That would tie the label-topic in an obvious way to the corresponding image topic and they always need to be used together (so it could even be an own message-type).

Thank you for bringing this topic to our attention and for providing a detailed analysis of the semantic and instance segmentation label publishing in the ROS2 camera graph. We appreciate your thoughtful suggestions for improving the structure of this feature.

The decision to publish both semantic and instance segmentation labels on a single topic (/cam_1/semantic_labels) was intentional. Since the data for both segmentation types is fundamentally the same, publishing them on a single topic helps minimize network traffic and optimizes the use of DDS (Data Distribution Service) resources.

We will implement the change you proposed in the near future. In the meantime, you will need to manually update the semantic label topic value in the camera helper OG nodes.

1 Like