intel/ros2_openvino_toolkit

Interpretation of RosTopic

NorrieDS opened this issue · 1 comments

Thank you very much for building such an excellent toolkit!
I am currently using its object segmentation in my project and have successfully launched openvino_node for segmentation with an HRNet model.
Now, I would like to use the published segmentation results in my custom node for further processes and checked the contents of the topic:

ros2 topic echo /ros2_openvino_toolkit/segmented_objects

header:
stamp:
sec: 47
nanosec: 634000000
frame_id: camera_color_optical_frame
objects_vector:

  • object_name: ''
    probability: -1.0
    roi:
    x_offset: 0
    y_offset: 0
    height: 320
    width: 320
    do_rectify: false
    mask_array:
    • -1.1778081748465806e-38
    • 4.015655517578125
    • -5.923568868393867e-39
    • -1.1778081748465806e-38
    • 4.015655517578125
    • -5.923568868393867e-39
    • -1.1778081748465806e-38
    • 4.015655517578125
    • -5.923568868393867e-39
    • -1.1778081748465806e-38
    • 4.015655517578125
    • -5.923568868393867e-39
      ...

Having expected an array ascribing each pixel to a class, I do not understand what this data means.
"probability: -1.0" in the header looks mysterious to me as well.
Could anyone explain what the topic represents and/or show me how I can convert this to a segmentation map in the cv::Mat format?
Thank you very much for your help!

I noticed that I should subscribe to /ros2_openvino_toolkit/image_rviz rather.