I want to publish a 2-dimensional array from a MATLAB function in Simulink to a ROS topic.
I have followed this tutorial where an example is given for a geometry_msgs/Point
. However, I want to use std_msgs/Float32MultiArray
which is a bit more complex:
I cannot even make it compile with Data
and DataOffset
only:
I get the following error:
Error in port widths or dimensions. Output port 1 of '.../MATLAB Function' is a [1x10] matrix.
Error in port widths or dimensions. Input port 2 of '.../Bus Assignment' is a one dimensional vector with 128 elements.