On this page

MenuEntryPublisher QML Type

Publishes visualization_msgs::msg::MenuEntry messages — MenuEntry message. More...

Import Statement: import QtRos2.VisualizationMsgs
Inherits:

PublisherBase

Status: Experimental Extension

Properties

Methods

Detailed Description

Each InteractiveMarker message has an array of MenuEntry messages. A collection of MenuEntries together describe a menu/submenu/subsubmenu/etc tree, though they are stored in a flat array. The tree structure is represented by giving each menu entry an ID number and a "parent_id" field. Top-level entries are the ones with parent_id = 0. Menu entries are ordered within their level the same way they are ordered in the containing array. Parent entries must appear before their children.

Example: - id = 3 parent_id = 0 title = "fun" - id = 2 parent_id = 0 title = "robot" - id = 4 parent_id = 2 title = "pr2" - id = 5 parent_id = 2 title = "turtle"

Gives a menu tree like this:

  • fun
  • robot
  • pr2
  • turtle

MenuEntryPublisher publishes menuEntry values to a ROS 2 topic. Set the topic and node properties, then call publish() to send messages.

See also MenuEntrySubscriber and menuEntry.

Property Documentation

command : string

The command field value included in the next publish. Setting this property emits commandChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.

commandType : uint8_t

The commandType field value included in the next publish. Setting this property emits commandTypeChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.

id : uint32_t

The id field value included in the next publish. Setting this property emits idChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.

parentId : uint32_t

The parentId field value included in the next publish. Setting this property emits parentIdChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.

title : string

The title field value included in the next publish. Setting this property emits titleChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.

Method Documentation

void publish(menuEntry msg)

Publishes menuEntry msg to the ROS 2 topic set by the topic property. Does nothing if the publisher is not connected.

© 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.