What does `Int32MultiArray.layout.data_offset` mean
Here's the contents of Int32MultiArray.msg
:
# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.
MultiArrayLayout layout # specification of data layout
int32[] data # array of data
And here's the contents of MultiArrayLayout
# The multiarray declares a generic multi-dimensional array of a
# particular data type. Dimensions are ordered from outer most
# to inner most.
MultiArrayDimension[] dim # Array of dimension properties
uint32 data_offset # padding bytes at front of data (A)
# 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] (B)
<snip>
Uh oh - contradiction! Is .layout.data_offset
the offset in bytes (A) or the offset in words (B)? If the former, how are we supposed to adjust for something unaligned like data_offset = 3
?