On this page

RangeSubscriber QML Type

Subscribes to 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:

SubscriberBase

Status: Experimental Extension

Properties

Signals

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.

RangeSubscriber receives range values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.

See also RangePublisher and range.

Property Documentation

fieldOfView : real

The fieldOfView field of the last received message. Updated whenever a new message arrives. fieldOfViewChanged is emitted on every update.

header : header

The header field of the last received message. Updated whenever a new message arrives. headerChanged is emitted on every update.

maxRange : real

The maxRange field of the last received message. Updated whenever a new message arrives. maxRangeChanged is emitted on every update.

message : range

The last message received on topic. Updated whenever a new message arrives.

minRange : real

The minRange field of the last received message. Updated whenever a new message arrives. minRangeChanged is emitted on every update.

radiationType : uint8_t

The radiationType field of the last received message. Updated whenever a new message arrives. radiationTypeChanged is emitted on every update.

range : real

The range field of the last received message. Updated whenever a new message arrives. rangeChanged is emitted on every update.

variance : real

The variance field of the last received message. Updated whenever a new message arrives. varianceChanged is emitted on every update.

Signal Documentation

messageReceived(range msg)

Emitted when a new range arrives on topic. msg contains the received value.

Note: The corresponding handler is onMessageReceived.

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