On this page

RangePublisher QML Type

Publishes sensor_msgs::msg::Range messages — Single range reading from an active ranger that emits energy and reports one range reading that is valid along an arc at the distance measured. More...

Import Statement: import QtRos2.SensorMsgs
Inherits:

PublisherBase

Status: Experimental Extension

Properties

Methods

Detailed Description

This message is not appropriate for laser scanners. See the LaserScan message if you are working with a laser scanner.

This message also can represent a fixed-distance (binary) ranger. This sensor will have min_range===max_range===distance of detection. These sensors follow REP 117 and will output -Inf if the object is detected and +Inf if the object is outside of the detection range.

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

See also RangeSubscriber and range.

Property Documentation

fieldOfView : real

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

header : header

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

maxRange : real

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

minRange : real

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

radiationType : uint8_t

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

range : real

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

variance : real

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

Method Documentation

void publish(range msg)

Publishes range 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.