On this page

occupancyGrid QML Value Type

This represents a 2-D grid map. More...

Import Statement: import QtRos2.NavMsgs
Status: Experimental Extension

Properties

Detailed Description

occupancyGrid is a structured value type usable in QML. It maps directly to the nav_msgs::msg::OccupancyGrid ROS 2 message type.

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

See also OccupancyGridPublisher and OccupancyGridSubscriber.

Property Documentation

data : ArrayBuffer

The map data, in row-major order, starting with (0,0).

Cell (1, 0) will be listed second, representing the next cell in the x direction. Cell (0, 1) will be at the index equal to info.width, followed by (1, 1). The values inside are application dependent, but frequently, 0 represents unoccupied, 1 represents definitely occupied, and -1 represents unknown.

header : header

info : mapMetaData

MetaData for the map

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