MultiArrayLayoutSubscriber QML Type
Subscribes to std_msgs::msg::MultiArrayLayout messages — This was originally provided as an example message. More...
| Import Statement: | import QtRos2.StdMsgs |
| Inherits: | |
| Status: | Deprecated since Foxy |
This type is deprecated since QtRos2.StdMsgs Foxy. We strongly advise against using it in new code.
Properties
- dataOffset : uint32_t
- dim : list<multiArrayDimension>
- message : multiArrayLayout
Signals
- messageReceived(multiArrayLayout msg)
Detailed Description
It is recommended to create your own semantically meaningful message. However if you would like to continue using this please use the equivalent in example_msgs.
The multiarray declares a generic multi-dimensional array of a particular data type. Dimensions are ordered from outer most to inner most.
Accessors should ALWAYS be written in terms of dimension stride and specified outer-most dimension first.
multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
A standard, 3-channel 640x480 image with interleaved color channels would be specified as:
dim[0].label = "height" dim[0].size = 480 dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image) dim[1].label = "width" dim[1].size = 640 dim[1].stride = 3*640 = 1920 dim[2].label = "channel" dim[2].size = 3 dim[2].stride = 3
multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
MultiArrayLayoutSubscriber receives multiArrayLayout values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.
See also MultiArrayLayoutPublisher and multiArrayLayout.
Property Documentation
dataOffset : uint32_t
The dataOffset field of the last received message. Updated whenever a new message arrives. dataOffsetChanged is emitted on every update.
dim : list<multiArrayDimension>
The dim field of the last received message. Updated whenever a new message arrives. dimChanged is emitted on every update.
message : multiArrayLayout
The last message received on topic. Updated whenever a new message arrives.
Signal Documentation
messageReceived(multiArrayLayout msg)
Emitted when a new multiArrayLayout 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.