Overlay Layout

Updated: October 28, 2024

The overlay layout is the layout used by an overlay viewer.

Specifying overlay layouts is optional. You may leave out specifying this in your configuration file. However, if you're specifying them, you can define one or more overlay layouts. The name of each overlay layout must follow the format: overlay_layout_number where number must be 1 for the first overlay layout you define, and each subsequent layout you specify, number is incremented by one. For example:

...
    "overlay_layout_1": [
        {
            "type": "widget",
            "path": "/usr/share/images/car.png",
            "width": 18000,
            "length": 45000,
            "height": 15000
       }
    ],
    "overlay_layout_2": [
        {
            "type": "widget",
            "path": "/usr/share/images/car.png",
            "width": 18000,
            "length": 45000,
            "height": 15000
       }
    ],
...
           

Attributes:

There are the properties that you can use to configure an overlay layout.

height
(Required) The height (in pixels) of the type to overlay.
width
(Required) The width (in pixels) of the type to overlay.
x
(Required) The x-coordinate of the position where you want to overlay the type.
y
(Required) The y-coordinate of the position where you want to overlay the type.
type
(Required) The type of overlay layout. Valid values for this property are:
  • image— An image to overlay.
  • label— Text to overlay.
  • rectangle— A rectangle to overlay.
  • widget— A special object to display information from an algorithm to overlay (e.g., used to overlay radar and navigation information).
There are type-specific properties that you need to define the overly layout. You may define these following properties depending on the type that you specify:
image
path
(Required) The path to the image to overlay.
rotation
(Optional) The rotation counter-clockwise in degrees of the image to overlay. If not specified, rotation is 0 degrees.
label
string
(Required) The string to overlay.
font_size
(Required) The rotation counter-clockwise in degrees of the image to overlay.
bold
(Optional) An indicator whether the string is to be shown in bold. Specify true if you want the string in bold. Otherwise the default is to NOT show the string in bold.
text_color
(Required) The color of the text to overlay. The color must be specified with the following data:
  • red
  • green
  • blue
  • alpha
rectangle
corner_radius
(Required) The cordner radius of the rectangle to overlay.
line_width
(Required) The width of the lines of the rectangle to overlay.
line_color
(Required) The color of the lines of the rectangle to overlay. The color must be specified with the following data:
  • red
  • green
  • blue
  • alpha
fill_color
(Required) The color of the fill for the rectangle to overlay. The color must be specified with the following data:
  • red
  • green
  • blue
  • alpha
widget
path
(Required) The path to the widget to overlay.
length
(Required) The length of the widget.
  翻译: