custom message for matrix or 2d array
Hi! I need to publish a matrix as a ROS message and I was looking around for common types of messages to see how 2d arrays were used. I checked on the following links
http://www.ros.org/wiki/common_msgs
I found many similar, but I couldn't find one with a 2D array or a matrix, only 1d arrays. Is that because I can just use a msg that has an array?
Any tutorials on this?
Just out of curiosity,trying to understand how the ROS message system handles the different possible sizes of arrays: I have seen other people using Int32MultiArray, for example, And they do
array.data.push_back(value);
So the message does not really contain a C++ int[] but something like a vector container, and that is how it can handle different sizes?
Thanks!