Marking

_images/marking_ellipse.png

Marking Ellipse is visualized using a white, cylinder marker

Properties

Marker properties are utilized to visualize properties of the incoming message:

  • Transparency - Detection Confidence

    Detection confidence is a value between 0.0 and 1.0, or unknown (-1). Transparency of the marker is proportional to the confidence. Confidence of 1.0 is completely opaque and confidence of 0.0 is completely transparent. An unknown confidence (-1), will appear as opaque, identical to a marker with 1.0 confidence.

Parameters

Configurable node parameters are:

Example

In this example, we will manually publish all different types of markings and observe it in RViz. Start the visualizer node:

ros2 run soccer_vision_3d_rviz_markers visualizer

Set up a publisher that publishes a Marking Array with all different types of markings:

ros2 topic pub soccer_vision_3d/markings soccer_vision_3d_msgs/msg/MarkingArray "
header:
  frame_id: 'camera'
ellipses:
  - diameter: 0.1
    center:
      position:
        x: 0.75
intersections:
  - center:
      x: 1.0
      y: -2.0
    num_rays: 2
    rays:
      - x: 0.0
        y: 1.0
      - x: -1.0
        y: 0.0
  - center:
      x: 1.0
      y: 2.0
    num_rays: 2
    rays:
      - x: 0.0
        y: -1.0
      - x: -1.0
        y: 0.0
segments:
  - start:
      x: 0.5
      y: -2.0
    end:
      x: 1.0
      y: -2.0
  - start:
      x: 1.0
      y: -2.0
    end:
      x: 1.0
      y: 2.0
  - start:
      x: 1.0
      y: 2.0
    end:
      x: 0.5
      y: 2.0
"

Open RViz2 with a demo configuration:

rviz2 -d $(ros2 pkg prefix --share soccer_vision_3d_rviz_markers)/rviz/demo.rviz

You should see the markings displayed in RViz:

_images/markings_rviz.png