MultiArrayLayoutPublisher QML Type
Publishes 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>
Methods
- void publish(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.
MultiArrayLayoutPublisher publishes multiArrayLayout values to a ROS 2 topic. Set the topic and node properties, then call publish() to send messages.
See also MultiArrayLayoutSubscriber and multiArrayLayout.
Property Documentation
dataOffset : uint32_t
The dataOffset field value included in the next publish. Setting this property emits dataOffsetChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.
dim : list<multiArrayDimension>
The dim field value included in the next publish. Setting this property emits dimChanged and, when autoPublish is true, requests a publish at the end of the current event-loop iteration.
Method Documentation
void publish(multiArrayLayout msg)
Publishes multiArrayLayout 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.