Send a 2D array through topics in ROS2
What is a proper way of sending 2D arrays through topics? I want to send small ones (4x6 for example) and so far I created an array msg (float64[]) and then use the .reshape function in order to send it as an unidimensional array. However, I do not know if there is a better way.
Thanks in advance for your help.