On this page

marker QML Value Type

See: - http://www.ros.org/wiki/rviz/DisplayTypes/Marker - http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes. More...

Import Statement: import QtRos2.VisualizationMsgs
Status: Experimental Extension

Properties

Detailed Description

for more information on using this message with rviz.

marker is a structured value type usable in QML. It maps directly to the visualization_msgs::msg::Marker ROS 2 message type.

Construct a marker in QML by assigning a JavaScript object whose keys are its component properties, or by setting those properties individually.

See also MarkerPublisher and MarkerSubscriber.

Property Documentation

action : int32_t

Action to take; one of:

  • 0 add/modify an object
  • 1 (deprecated)
  • 2 deletes an object (with the given ns and id)
  • 3 deletes all objects (or those with the given ns if any)

color : colorRGBA

Color of the object; in the range: [0.0-1.0]

colors : list<colorRGBA>

Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, etc.)

The number of colors provided must either be 0 or equal to the number of points provided. NOTE: alpha is not yet used

frameLocked : bool

If this marker should be frame-locked, i.e. retransformed into its frame every timestep.

header : header

Header for timestamp and frame id.

id : int32_t

Object ID used in conjunction with the namespace for manipulating and deleting the object later.

lifetime : duration

How long the object should last before being automatically deleted.

0 indicates forever.

meshFile : meshFile

meshResource : string

Only used for MESH_RESOURCE markers.

Similar to texture_resource, mesh_resource uses resource retriever to load a mesh. Optionally, a mesh file can be sent in-message via the mesh_file field. If doing so, use the following format for mesh_resource: "embedded://mesh_name"

meshUseEmbeddedMaterials : bool

ns : string

Namespace in which to place the object.

Used in conjunction with id to create a unique name for the object.

points : list<point>

Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ARROW_STRIP, etc.)

pose : pose

Pose of the object with respect the frame_id specified in the header.

scale : vector3

Scale of the object; 1,1,1 means default (usually 1 meter square).

text : string

Only used for text markers

texture : compressedImage

An image to be loaded into the rendering engine as the texture for this marker.

This will be used iff texture_resource is set to embedded.

textureResource : string

Texture resource is a special URI that can either reference a texture file in

a format acceptable to (resource retriever)[https://docs.ros.org/en/rolling/p/resource_retriever/] or an embedded texture via a string matching the format: "embedded://texture_name"

type : int32_t

Type of object.

uvCoordinates : list<uVCoordinate>

Location of each vertex within the texture; in the range: [0.0-1.0]

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.