On this page

LaserScanPublisher QML Type

Publishes sensor_msgs::msg::LaserScan messages — Single scan from a planar laser range-finder. More...

Import Statement: import QtRos2.SensorMsgs
Inherits:

PublisherBase

Status: Experimental Extension

Properties

Methods

Detailed Description

If you have another ranging device with different behavior (e.g. a sonar array), please find or create a different message, since applications will make fairly laser-specific assumptions about this data

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

See also LaserScanSubscriber and laserScan.

Property Documentation

angleIncrement : real

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

angleMax : real

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

angleMin : real

The angleMin field value included in the next publish. Setting this property emits angleMinChanged 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.

intensities : list<real>

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

rangeMax : real

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

rangeMin : real

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

ranges : list<real>

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

scanTime : real

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

timeIncrement : real

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

Method Documentation

void publish(laserScan msg)

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